We have some clients that send mail through our mail server. To batch send the mail, we have all mail on specific port (in this case 1025) forwarded to an accept script which saves the details in MySQL for batch processing. When I test this, it works perfectly, when the client tests, it works perfectly, however, when they send out from their Unica system, it looks like the mail goes straight past the script and into the mail stream. Is this possible?
Here are the lines from master.cf
000.000.000.000:1025 inet n - - - 0 smtpd
-o mynetworks=hash:/etc/postfix/injector/networks
-o content_filter=clientid:
-o syslog_name=clientid
-o smtpd_timeout=1800s
clientid unix - n n - 0 pipe
flags=q user=filter argv=/var/injector/inject.php clntid
Any help would be much appreciated!
Thanks!
to be able to diagnose the problem, you first need to start gathering more data. you can use the debug_peer_level and debug_peer_list options in /etc/postfix/main.cf.
e.g.
(increase the debug level even further if that doesn't provide enough info)
once you've got that data, you'll be able to tell for sure whether the mail from the unica system is actually going to your custom filter or not (and it sounds like it isn't)
SMTP goes through port 25 (thats a standard), so when your client sends through the Unica system, its sending to that port. On your side, the smtpd process listening on port 25 knows nothing about the inject.php script.
Your client must send through a system that is aware of your use of a non-standard port, be that a MTA (SMTP server), or a plain mail client. Or you have to redesign your setup.
Yes, you can remove the address (see
man 5 master
).To clarify a bit, since we don't fully see your config, maybe you can get what you want (untested). If your client, or whatever, doesn't send to your port 1025, then aparently you can route his mail based on the sender address or domain.
For really detailed debugging, I'll sometimes do a tcpdump and pull that back into ethereal to examine the exact SMTP session that took place.