I'm running postfix + dovecot on my CentOS server, together with amavisd, clamd and spamassassin, following the instructions in http://wiki.centos.org/HowTos/postfix. As far as I can see it is all working, but I must admit I'm not clear exactly what path an incoming email travels along. I asked this question before, and someone suggested a document I should read, but unfortunately I've mislaid the note I made at the time.
So if someone could enlighten me - or point to a source of enlightenment - I should be most grateful.
On 11/28/2013 10:34 PM, Timothy Murphy wrote:
I'm running postfix + dovecot on my CentOS server, together with amavisd, clamd and spamassassin, following the instructions in http://wiki.centos.org/HowTos/postfix. As far as I can see it is all working, but I must admit I'm not clear exactly what path an incoming email travels along. I asked this question before, and someone suggested a document I should read, but unfortunately I've mislaid the note I made at the time.
So if someone could enlighten me - or point to a source of enlightenment - I should be most grateful.
http://www.postfix.org/OVERVIEW.html
Regards, Patrick
Patrick Lists wrote:
On 11/28/2013 10:34 PM, Timothy Murphy wrote:
I'm running postfix + dovecot on my CentOS server, together with amavisd, clamd and spamassassin, following the instructions in http://wiki.centos.org/HowTos/postfix. As far as I can see it is all working, but I must admit I'm not clear exactly what path an incoming email travels along. I asked this question before, and someone suggested a document I should read, but unfortunately I've mislaid the note I made at the time.
So if someone could enlighten me - or point to a source of enlightenment - I should be most grateful.
I'm afraid this document only tells me about one small step on the journey. It doesn't mention amavis, fetchmail or dovecot. I run fetchmail (through cron.d) to collect email from various email servers. So the first step, I guess, is that fetchmail passes the email through port 25 to the postfix sendmail emulator?
On Fri, Nov 29, 2013 at 01:23:52PM +0000, Timothy Murphy wrote:
Patrick Lists wrote:
On 11/28/2013 10:34 PM, Timothy Murphy wrote:
I'm running postfix + dovecot on my CentOS server, together with amavisd, clamd and spamassassin, following the instructions in http://wiki.centos.org/HowTos/postfix. As far as I can see it is all working, but I must admit I'm not clear exactly what path an incoming email travels along.
I'm afraid this document only tells me about one small step on the journey. It doesn't mention amavis, fetchmail or dovecot. I run fetchmail (through cron.d) to collect email from various email servers.
So the first step, I guess, is that fetchmail passes the email through port 25 to the postfix sendmail emulator?
If you completed the steps in that article, then fetchmail would be grabbing the mail from the Dovecot server.
Really short version.
Mail sent to your machine, on port 25, would go to postfix, which would then do something with it.
Where is fetchmail pulling? From your Dovecot server? If so, then mail comes in, goes to postfix, which sends it to Dovecot, where you then get it from fetchmail.
Slightly longer version.
Mail on port 25 comes into your server, e.g., postfix, which would then, again, assuming you made a setup like Ned's article, give it to Dovecot.
As an example, my even simpler setup has mail coming into my postfix server, which I then set up to pass along to maildrop to filter and deliver the mail. For a pop account from my ISP, for example, the roadrunner.com that I use on this list, I have getmail (same idea as fetchmail) pull it, and it makes no use of my postfix server.
If fetchmail is pulling from your ISP, or gmail, then that wouldn't be working with postfix, it would be something between you and gmail or ISP.
I haven't followed the thread, so am not entirely sure I've answered your question.
Patrick Lists wrote:
On 11/28/2013 10:34 PM, Timothy Murphy wrote:
I'm running postfix + dovecot on my CentOS server, together with amavisd, clamd and spamassassin, following the instructions in http://wiki.centos.org/HowTos/postfix. As far as I can see it is all working, but I must admit I'm not clear exactly what path an incoming email travels along. I asked this question before, and someone suggested a document I should read, but unfortunately I've mislaid the note I made at the time.
So if someone could enlighten me - or point to a source of enlightenment - I should be most grateful.
I'm afraid this document only tells me about one small step on the journey. It doesn't mention amavis, fetchmail or dovecot. I run fetchmail (through cron.d) to collect email from various email servers. So the first step, I guess, is that fetchmail passes the email through port 25 to the postfix sendmail emulator?
Timothy,
Assuming that you've properly configured the master.cf and main.cf to allow amavisd/clamav scanning of email, the following is how the process will flow:
Remote mail client (user, some other mail server, etc) connects to port 25 to send an email through your Postfix installation.
Postfix passes the email to amavisd over some port.
Amavisd processes the email through clamav and, if the message is clean, passes it back to Postfix through a different port.
Postfix delivers the message (to a remote mail server, or to a local user).
Mike Burger wrote:
I'm running postfix + dovecot on my CentOS server, together with amavisd, clamd and spamassassin, following the instructions in http://wiki.centos.org/HowTos/postfix. As far as I can see it is all working, but I must admit I'm not clear exactly what path an incoming email travels along. I asked this question before, and someone suggested a document I should read, but unfortunately I've mislaid the note I made at the time.
Assuming that you've properly configured the master.cf and main.cf to allow amavisd/clamav scanning of email, the following is how the process will flow:
Remote mail client (user, some other mail server, etc) connects to port 25 to send an email through your Postfix installation.
Postfix passes the email to amavisd over some port.
Amavisd processes the email through clamav and, if the message is clean, passes it back to Postfix through a different port.
Postfix delivers the message (to a remote mail server, or to a local user).
Thanks for your response. I've a couple of queries.
1) Where does SpamAssassin come into the process?
2) In my case all incoming email comes through fetchmail from external mail servers like gmail. I take it that this is sent through port 25 to postfix, more precisely to the sendmail emulator of postfix?
3) I take it that in the last stage postfix passes the email to dovecot, which stores it in ~/Maildir/cur/ (in my case).
It is picked up from there by KMail on my laptop, but that is another story.
On Sat, Nov 30, 2013 at 2:33 PM, Timothy Murphy gayleard@eircom.net wrote:
Mike Burger wrote:
I'm running postfix + dovecot on my CentOS server, together with amavisd, clamd and spamassassin, following the instructions in http://wiki.centos.org/HowTos/postfix. As far as I can see it is all working, but I must admit I'm not clear exactly what path an incoming email travels along. I asked this question before, and someone suggested a document I should read, but unfortunately I've mislaid the note I made at the time.
Assuming that you've properly configured the master.cf and main.cf to allow amavisd/clamav scanning of email, the following is how the process will flow:
Remote mail client (user, some other mail server, etc) connects to port
25
to send an email through your Postfix installation.
Postfix passes the email to amavisd over some port.
Amavisd processes the email through clamav and, if the message is clean, passes it back to Postfix through a different port.
Postfix delivers the message (to a remote mail server, or to a local user).
Thanks for your response. I've a couple of queries.
Where does SpamAssassin come into the process?
In my case all incoming email comes through fetchmail
from external mail servers like gmail. I take it that this is sent through port 25 to postfix, more precisely to the sendmail emulator of postfix?
- I take it that in the last stage postfix passes the email to dovecot,
which stores it in ~/Maildir/cur/ (in my case).
It is picked up from there by KMail on my laptop, but that is another story.
Why do you insist on calling it the "sendmail emulator"? Sendmail,
postfix, exim and many others applications are merely servers that respond to and process emails according to the SMTP protocols. There's nothing special about sendmail except that it was one of the first and most widespread of mail servers.
Cheers,
Cliff
On Fri, Nov 29, 2013 at 10:53 PM, Cliff Pratt enkiduonthenet@gmail.com wrote:
Why do you insist on calling it the "sendmail emulator"? Sendmail,
postfix, exim and many others applications are merely servers that respond to and process emails according to the SMTP protocols. There's nothing special about sendmail except that it was one of the first and most widespread of mail servers.
Traditional unix programs expect to be able to pipe through an executable named sendmail when they want to send mail. Postfix provides such an executable. I don't know offhand if fetchmail pipes through sendmail for local delivery or uses smtp protocol, but if it runs an executable named sendmail that is not actually sendmail, it seems reasonable to call that emulation. Actually it seems reasonable either way to me, but I suppose that's a matter of opinion...
On 2013-11-30, Les Mikesell lesmikesell@gmail.com wrote:
Traditional unix programs expect to be able to pipe through an executable named sendmail when they want to send mail. Postfix provides such an executable. I don't know offhand if fetchmail pipes through sendmail for local delivery or uses smtp protocol,
fetchmail defaults to using localhost's port 25 to talk SMTP, but can be configured to use a local MDA instead.
--keith
On Fri, Nov 29, 2013 at 11:35:25PM -0600, Les Mikesell wrote:
On Fri, Nov 29, 2013 at 10:53 PM, Cliff Pratt enkiduonthenet@gmail.com wrote:
Traditional unix programs expect to be able to pipe through an executable named sendmail when they want to send mail. Postfix provides such an executable. I don't know offhand if fetchmail pipes through sendmail for local delivery or uses smtp protocol, but if it runs an executable named sendmail that is not actually sendmail, it seems reasonable to call that emulation.
Fetchmail (and getmail) don't make use of smtp. As their name suggests, they get mail, pulling it from a pop or imap server, whether on your ISP or local server. From there, they might send it elsewhere, depending upon the setup.
I'm not sure about fetchmail, but getmail, for example, will hand my emails off to maildrop, which then sends them through spamc before going further. In contrast postfix, which I use for a barely used account, will also get my mail, and in my case, again hand it off to maildrop.
So while one could have fetchmail or getmail hand off to postfix it seems to me that the more common scenario would be having them hand off to procmail, maildrop, or something similar.
On Sat, Nov 30, 2013 at 07:43:36AM -0500, Scott Robbins wrote:
Fetchmail (and getmail) don't make use of smtp. As their name suggests,
Yes it does.
From "man fetchmail"
As each message is retrieved, fetchmail normally delivers it via SMTP to port 25 on the machine it is running on (localhost), just as though it were being passed in over a normal TCP/IP link. fetchmail provides the SMTP server with an envelope recipient derived in the manner
So, for example, in my fetchmailrc file: poll verizon via pop.verizon.net port 995 user verizonusername is foo here
If I look at the headers of a message:
Received: from pop.verizon.net (localhost [127.0.0.1]) by spuddy.org (8.13.8/8.13.8) with ESMTP id p6LKB3b6010977 for foo@localhost; Fri, 29 Nov 2013 16:11:03 -0400
It's clear this was passed from fetchmail to the local SMTP server.
Of course you _can_ configure fetchmail to operate differently, but this is its default behaviour.
On Sat, Nov 30, 2013 at 08:06:49AM -0500, Stephen Harris wrote:
On Sat, Nov 30, 2013 at 07:43:36AM -0500, Scott Robbins wrote:
Fetchmail (and getmail) don't make use of smtp. As their name suggests,
Yes it does.
From "man fetchmail"
As each message is retrieved, fetchmail normally delivers it via SMTP to port 25 on the machine it is running on (localhost), just as though the SMTP server with an envelope recipient derived in the manner
Well thank you. I actually had the correct thought in my head and typed the wrong word, meaning the write postfix rather than smtp. Although having used getmail for many years, I hadn't realized that fetchmail does use smtp to deliver, so I stand corrected both in fact and intention.
Getmail can reinject through smtp if necessary too, so even the intention was incorrect. I blame it on the lack of caffeine, which I shall now rectify. :)
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
On 11/30/2013 04:43 AM, Scott Robbins wrote:
Fetchmail (and getmail) don't make use of smtp. As their name suggests, they get mail, pulling it from a pop or imap server, whether on your ISP or local server. From there, they might send it elsewhere, depending upon the setup.
The traditional, and I believe default, fetchmail setup is to hand off to SMTP for local delivery.
I've always found this problematic and usually overridden it. But as I'm using getmail these days (fetchmail is just too fussy in general), I don't have an example configuration to share.
- -- David Benfell see https://parts-unknown.org/node/2 if you don't understand the attachment
Mike Burger wrote:
I'm running postfix + dovecot on my CentOS server, together with amavisd, clamd and spamassassin, following the instructions in http://wiki.centos.org/HowTos/postfix. As far as I can see it is all working, but I must admit I'm not clear exactly what path an incoming email travels along. I asked this question before, and someone suggested a document I should read, but unfortunately I've mislaid the note I made at the time.
Assuming that you've properly configured the master.cf and main.cf to allow amavisd/clamav scanning of email, the following is how the process will flow:
Remote mail client (user, some other mail server, etc) connects to port 25 to send an email through your Postfix installation.
Postfix passes the email to amavisd over some port.
Amavisd processes the email through clamav and, if the message is clean, passes it back to Postfix through a different port.
Postfix delivers the message (to a remote mail server, or to a local user).
Thanks for your response. I've a couple of queries.
Where does SpamAssassin come into the process?
In my case all incoming email comes through fetchmail
from external mail servers like gmail. I take it that this is sent through port 25 to postfix, more precisely to the sendmail emulator of postfix?
- I take it that in the last stage postfix passes the email to dovecot,
which stores it in ~/Maildir/cur/ (in my case).
It is picked up from there by KMail on my laptop, but that is another story.
1) Usually via procmail, called in /etc/procmailrc. On my system, that file contains:
USER=`whoami`
:0 fw | spamc
:0 e { EXITCODE=$? }
2) Fetchmail is, effectively, a mail client, and connects to Gmail via IMAP or POP3. Without seeing the fetchmail configuration (I've never had to make use of it), I'll have to assume that fetchmail does pass the mail through to Postfix over port 25.
To clarify on the second part of this question, there's no "sendmail emulator" in play, though...Postfix is a replacement for Sendmail, with all the requisite functionality built in without having to resort to some sort of emulation.
3) Postfix makes use of the procmail agent to deliver the email to the mail spools in /var/spool/mail and/or, if the user has procmail recipes in place to do any type of sorting/archival, mail spool files usually in $HOMEDIR/mail. Dovecot then queries those mailstores (POP3 will only query the inbox in /var/spool/mail, IMAP will query all of the other folders as long as your mail client requests it to do so).
On Fri, Nov 29, 2013 at 3:04 AM, Timothy Murphy gayleard@eircom.net wrote:
I'm running postfix + dovecot on my CentOS server, together with amavisd, clamd and spamassassin, following the instructions in http://wiki.centos.org/HowTos/postfix. As far as I can see it is all working, but I must admit I'm not clear exactly what path an incoming email travels along. I asked this question before, and someone suggested a document I should read, but unfortunately I've mislaid the note I made at the time.
So if someone could enlighten me - or point to a source of enlightenment - I should be most grateful.
Search string "spamassasin routing via postfix" - interesting links (perhaps enlightening) http://commons.oreilly.com/wiki/index.php/SpamAssassin/Integrating_SpamAssassinwith_Postfix http://jessen.ch/articles/spamassassin-and-postfix/config.shtml http://forum.parallels.com/showthread.php?293113-Understanding-Postfix-amp-Spamassassin
Hopefully, the above links provide the info you are looking for.