Well, the mail is queued as 1391122500. Can you 'cat /var/log/maillog |grep 1391122500' to see exactly what happened to the mail. I am sure that mail is going to [email protected], means Postfix will check the mx of marzocchi.net <[email protected]> and deliver mail to that host. If you want to send mail locally you need to use username@fqdn_hostname.Means root@ myHostname.my3rdLevel.marzocchi.net<http://myhostname.my3rdlevel.marzocchi.net/> .
On Fri, Jan 31, 2014 at 5:02 AM, Olaf Marzocchi <[email protected]> wrote: > > Hello, > I set postfix (see http://www.marzocchi.net/Olafsen/Software/OmniOSPostfixAndStunnel ) and it seems it works well, that means I can send mail from the terminal and I will get it correctly when I specify a complete address, and the same applies to daemons that accept as parameter an email address, for example smartd. > However, if a daemon send mail to local users (typically root) for any reason, I never get it. > > I see in the /var/log/maillog a bunch of these messages (I don't know which service is sending them): > --- > Jan 30 23:50:00 myHostname postfix/qmgr[13677]: [ID 197553 mail.info] 2A94D1AC22: removed > Jan 30 23:55:00 myHostname postfix/pickup[13676]: [ID 197553 mail.info] 30CA41AC26: uid=0 from=<root> > Jan 30 23:55:00 myHostname postfix/cleanup[13826]: [ID 197553 mail.info] 30CA41AC26: message-id=< [email protected]> > Jan 30 23:55:00 myHostname postfix/qmgr[13677]: [ID 197553 mail.info] 30CA41AC26: from=<[email protected]>, size=1107, nrcpt=1 (queue active) > Jan 30 23:55:00 myHostname postfix/smtp[13828]: [ID 197553 mail.info] 30CA41AC26: to=<[email protected]>, orig_to=<root>, relay=127.0.0.1[127.0.0.1]:11125, delay=0.62, delays=0.01/0.01/0.45/0.15, dsn=2.0.0, status=sent (250 ok 1391122500 qp 12366) > Jan 30 23:55:00 myHostname postfix/qmgr[13677]: [ID 197553 mail.info] 30CA41AC26: removed > -- > > I can replicate them also by sending manually mail to either root or to my user, without specifying the @ and the domain. > > I tried to edit /etc/postfix/aliases by adding > root: [email protected] > and then I ran > /usr/local/bin/newaliases -oAhash:/etc/postfix/aliases > (I tried also dbm, just to be sure) > but nothing. > mailq is empty. > > In main.cf, the custom settings are: > --- > mydestination = $myhostname, localhost.$mydomain, localhost > mynetworks_style = host > > myhostname=myHostname.my3rdLevel.marzocchi.net > mydomain=my3rdLevel.marzocchi.net > myorigin=$mydomain > --- > > I checked the manual but after three hours I gave up and I ask you, I have no idea about how to automatically forward mail for local users to external email addresses. > > Could you please help me? > > Thanks! > Olaf Marzocchi >
