F20 Where's my system mail?

Timothy Murphy gayleard at eircom.net
Sat Apr 19 23:15:34 UTC 2014


Heinz Diehl wrote:

>> Am I rignt in thinking that fetchmail actually passes the email
>> on to postfix's sendmail-emulator?
> 
> Judging from the header fragments you posted, I'm shure that your
> fetchmail connects to your postfix via localhost on port 25. You could
> avoid that step by telling fechmail to deliver your mail to "something
> else" (see the "mda" option). Here's an example (from my own setup).

That's an interesting suggestion -
I haven't seen it mentioned anywhere in the postfix documents I've read.

> Mail I send is delivered to postfix on localhost (via mutt),
> which connects with my uplink (smarthost) and pushes the mail
> out.

I never send email directly from the server,
though some administrative sent by root comes to me.
I always send email from my laptop using the laptop's sendmail.
This must go through the server on its way to my smart-host,
but I guess it isn't looked at by postfix on the server?

> Postfix delivers your mail to what you have specified in
> "home_mailbox" after processing, in your case. What you do with it
> afterwards is out of reach for postfix, which regards your mail as
> delivered when it's send to "home_mailbox".

This is one point that confuses me somewhat.
Does postfix actually deposit the mail in my home_mailbox,
which in my case is ~/Maildir?
I had the impression that email is passed through unix or other sockets,
and is never actually deposited anywhere until it finishes its journey
through the server.
And I'm not clear how postfix and amavis interact.
You seem to suggest that postfix finishes its job,
and then passes the email in some way to amavis,
which I presume sends it through clamav and spamassassin?

> 
> Maybe I begin to understand what confuses you:
> don't think of mail only going into two directions (in/out) when you think
> of a fully-fledged MTA as e.g. postfix, exim, sendmail and
> similar. Otherwise, you miss "through". The MTA can not know if mail
> which comes "in" (fetchmail) or shall "out" (mail you send) should go
> these ways unless you told it explicitely. This is why mydestination, the
> smarthost and other parameters are crucial. You could e.g. set up
> postfix solely as a relay/mail gateway.

I don't think I am confused about that.
In fact I'm not sure I'm confused at all.
I'm just trying to work out exactly how postfix, amavis and dovecot
interact with each other -
in effect, what is the journey through the server
taken by an individual piece of email?

I found in setting up postfix and amavis
that some settings could only be determined by experiment,
eg I found I had to add $domain to
mydestination = $myhostname, localhost.$mydomain, localhost, $mydomain
before it worked properly,
although in my view it is not possible to deduce this
from the lengthy description of mydestination in main.cf.

That is why I suggested that setting up postfix,
at least with amavis and dovecot, is far from simple.

-- 
Timothy Murphy  
e-mail: gayleard /at/ eircom.net
School of Mathematics, Trinity College, Dublin 2, Ireland




More information about the users mailing list