Monday, 19 August 2013

Postfix is not forwarding emails

Postfix is not forwarding emails

I'm currently working with Postfix on Ubuntu 12.04. I have managed to set
it up so that it can send email (using PHP's mail() command), and I'm
currently trying to get it to forward email.
I've set up mysql-virtual-alias-maps.cf:
user = <actual user here>
password = <actual password here>
hosts = 127.0.0.1
dbname = mailserver
query = SELECT result FROM forwardings WHERE pattern = '%s'
And in the forwardings DB, I have mappings from (for example)
pattern=x@example.com to result=y@gmail.com. However, the mail is not
being forwarded. I have restarted Postfix several times and tried
reloading everything using postconf to no avail.
According to my logs, the message is being sent (notably, status=sent
(delivered to command: procmail -a "$EXTENSION")):
Aug 19 18:15:46 EXAMPLE postfix/smtpd[22988]: warning: dict_nis_init: NIS
domain name not set - NIS lookups disabled
Aug 19 18:15:46 EXAMPLE postfix/smtpd[22988]: connect from
snt0-omc3-s4.snt0.hotmail.com[65.55.90.143]
Aug 19 18:15:46 EXAMPLE postfix/smtpd[22988]: D919E24040045:
client=snt0-omc3-s4.snt0.hotmail.com[65.55.90.143]
Aug 19 18:15:47 EXAMPLE postfix/cleanup[22994]: D919E24040045:
message-id=<SNT148-W9527FD0072ADE72A5E099A1420@phx.gbl>
Aug 19 18:15:47 EXAMPLE postfix/qmgr[22827]: D919E24040045:
from=<SOMEADDRESS@outlook.com>, size=1695, nrcpt=1 (queue active)
Aug 19 18:15:47 EXAMPLE postfix/local[22995]: warning: dict_nis_init: NIS
domain name not set - NIS lookups disabled
Aug 19 18:15:47 EXAMPLE postfix/local[22995]: D919E24040045:
to=<x@example.com>, relay=local, delay=0.21, delays=0.2/0.01/0/0.01,
dsn=2.0.0, status=sent (delivered to command: procmail -a "$EXTENSION")
Aug 19 18:15:47 EXAMPLE postfix/qmgr[22827]: D919E24040045: removed
Aug 19 18:15:47 EXAMPLE postfix/smtpd[22988]: disconnect from
snt0-omc3-s4.snt0.hotmail.com[65.55.90.143]
However, no mail is ever received.
What can I do to get the mail forwarding properly?

No comments:

Post a Comment