If you want to plug citadel behind a frontend postfix for whatever reason (smothter spamassesin integration, improved security (maybe postfix has been audited more often than citadel...? ))
So far you would have run into a major drawback: how would postfix know, whether it should deliver a mail, or reject it due to being sent to a non existant user? At present times spammer tend to do dictionary attacks, and use wrong from addresses. If postfix accepts the mail, and gets a reject by postfix, it will try to notify the sender that it wasn't able to deliver it. in most cases, non existant senders, which will cause double-bounces filling up your aide folder.

So here's the solution to the case:
Postfix supports non local (unix users) delivery tables. You can do user lookup for example in a mysql table, or postgres, dbm, ldap and, since later versions of postfix (2.2 and later, earlier in patches, for example debian sarge; search for dict_tcp.so) via TCP lookup.
Now citadel offers such a service. To configure it, follow these steps:
Upgrade to latest citadel and webcit(6.84 and later).
Configure
Administration -> Edit site-wide configuration -> Network -> Postfix TCP Dictionary Port
to a port of your choice. Restart the citadel system to make it open the port using "sendcommand down" as root on your shell.
To check back if it worked out, do "netstat -lnp" if citserver provides your port.

Now postfix.
Check if /etc/postfix/dynamicmaps.cf contains something like "tcp /usr/lib/postfix/dict_tcp.so dict_tcp_open"

Take the appended main.cf, and replace 777 with your port (or add the matching lines to your config). Make postfix reload its config using "postfix reload" as root on your shell.
Use "tail -f /var/log/mail" or "tail -f /var/log/mail/current" depending on your syslog facility to check the effort:

Aug 27 23:29:00 [postfix/postfix-script] refreshing the Postfix mail system
Aug 27 23:29:00 [postfix/master] reload configuration

or if you do "postfix stop; postfix start" :
Aug 28 22:32:30 [postfix/postfix-script] stopping the Postfix mail system
Aug 28 22:32:30 [postfix/master] terminating on signal 15
Aug 28 22:32:33 [postfix/postfix-script] starting the Postfix mail system
Aug 28 22:32:33 [postfix/master] daemon started -- version 2.1.5

and use another mail account to verify that it works:
sending Mail to an existing user should look like that:

Aug 29 00:34:41 [postfix/smtpd] connect from yourtestmta.org[testmta ip]
Aug 29 00:34:41 [postfix/smtpd] E69F29ED1: client=yourtestmta.org[testmta ip]
Aug 29 00:34:41 [postfix/cleanup] E69F29ED1: message-id=<[EMAIL PROTECTED]>
Aug 29 00:34:41 [postfix/qmgr] E69F29ED1: from=, size=838, nrcpt=1 (queue active)
Aug 29 00:34:41 [postfix/smtpd] disconnect from yourtestmta.org[yourtestmta ip]
Aug 29 00:34:42 [citadel] 8137: from=, nrcpts=1, relay= [], stat=250 2.0.0 Message accepted.__
Aug 29 00:34:42 [postfix/lmtp] E69F29ED1: to=, relay=/var/run/citadel/lmtp.socket[/var/run/citadel/lmtp.socket], delay=1, status=sent (250 2.0.0 Message accepted.)
Aug 29 00:34:42 [postfix/qmgr] E69F29ED1: removed

if you view citadel logging:
Aug 29 00:34:32 [citadel] : get [EMAIL PROTECTED]
Aug 29 00:34:32 [citadel] sending 200 OK [EMAIL PROTECTED]
and the usual delivery and sorting afterwards.

now the non match case:
Aug 29 00:33:40 [postfix/smtpd] connect from unknown[testmta ip]
Aug 29 00:33:41 [postfix/smtpd] NOQUEUE: reject: RCPT from unknown[testmta ip]: 550 : Recipient address rejected: User unknown i

Attachment: main.cf
Description: Binary data

Reply via email to