Results 1 to 1 of 1
Hi all,
I'm trying to configure Postfix with spamassassin. I'm using virtual domains and accounts with mysql database. Everything works OK without the spamassassin. When I try to use it ...
Enjoy an ad free experience by logging in. Not a member yet? Register.
- 01-02-2005 #1Just Joined!
- Join Date
- Jan 2005
- Location
- Bulgaria
- Posts
- 26
postfix error while trying to use with spamassassin
Hi all,
I'm trying to configure Postfix with spamassassin. I'm using virtual domains and accounts with mysql database. Everything works OK without the spamassassin. When I try to use it with postfix it gives me an error and I cannot receive e-mails to my virtual accounts.
Here is the /var/log/maillog information, and below I'll paste the config files:
Jan 2 00:36:11 hosting postfix/qmgr[22204]: 57B16D370: from=<root@hosting.megalan.bg>, size=655, nrcpt=1 (queue active)
Jan 2 00:36:11 hosting postfix/qmgr[22204]: B3DC1D365: from=<maravunko@mail.bg>, size=3219, nrcpt=1 (queue active)
Jan 2 00:36:32 hosting postfix/smtpd[22205]: connect from mx1.mail.bg[193.201.172.114]
Jan 2 00:36:32 hosting postfix/smtpd[22205]: DE4229AEC: client=mx1.mail.bg[193.201.172.114]
Jan 2 00:36:32 hosting postfix/cleanup[22212]: DE4229AEC: message-id=<1104618993.62a240e5931f6@mail.bg>
Jan 2 00:36:32 hosting postfix/qmgr[22204]: DE4229AEC: from=<maravunko@mail.bg>, size=3213, nrcpt=1 (queue active)
Jan 2 00:36:32 hosting postfix/smtpd[22205]: disconnect from mx1.mail.bg[193.201.172.114]
Jan 2 00:37:06 hosting spamd[22000]: connection from localhost [127.0.0.1] at port 1062
Jan 2 00:37:06 hosting spamd[22000]: handle_user: unable to find user 'nikolay@zayanelov.com'!
Jan 2 00:37:06 hosting spamd[22000]: processing message <200501012233.j01MX1BG022168@hosting.megalan.bg> for nikolay@zayanelov
.com:995.
Jan 2 00:37:06 hosting spamd[22001]: connection from localhost [127.0.0.1] at port 1063
Jan 2 00:37:06 hosting spamd[22001]: handle_user: unable to find user 'nikolay@zayanelov.com'!
Jan 2 00:37:06 hosting spamd[22001]: processing message <1104618993.62a240e5931f6@mail.bg> for nikolay@zayanelov.com:995.
Jan 2 00:37:06 hosting spamd[22002]: connection from localhost [127.0.0.1] at port 1064
Jan 2 00:37:06 hosting spamd[22002]: handle_user: unable to find user 'nikolay@zayanelov.com'!
Jan 2 00:37:06 hosting spamd[22002]: processing message <1104618881.5d37a108e05b3@mail.bg> for nikolay@zayanelov.com:995.
Jan 2 00:37:06 hosting sendmail[22218]: j01Mb6rf022218: Authentication-Warning: hosting.megalan.bg: spamfilter set sender to
root@hosting.megalan.bg using -f
Jan 2 00:37:06 hosting sendmail[22227]: j01Mb6A9022227: Authentication-Warning: hosting.megalan.bg: spamfilter set sender to
maravunko@mail.bg using -f
Jan 2 00:37:06 hosting sendmail[22226]: j01Mb6hQ022226: Authentication-Warning: hosting.megalan.bg: spamfilter set sender to
maravunko@mail.bg using -f
Jan 2 00:37:07 hosting spamd[22000]: clean message (-1.5/5.0) for nikolay@zayanelov.com:995 in 1.5 seconds, 677 bytes.
Jan 2 00:37:07 hosting spamd[22000]: result: . -1 - ALL_TRUSTED,NO_DNS_FOR_FROM,NO_REAL_NAME scantime=1.5,size=677,mid=<20050
1012233.j01MX1BG022168@hosting.megalan.bg>,autolearn=ham
Jan 2 00:37:07 hosting sendmail[22218]: j01Mb6rf022218: from=root@hosting.megalan.bg, size=890, class=0, nrcpts=1, msgid=<200
501012233.j01MX1BG022168@hosting.megalan.bg>, relay=spamfilter@localhost
and cycles this messages until stop the spamassassin
Here are the non-default variables:
root@hosting:~# postconf -n
alias_maps = hash:/etc/postfix/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
html_directory = no
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/local/man
mydestination = $myhostname, localhost.$mydomain, localhost
mydomain = megalan.bg
myhostname = hosting.megalan.bg
mynetworks = 127.0.0.0/8
myorigin = $myhostname
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = no
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtpd_recipient_restrictions = permit_mynetworks, check_client_access hash:/etc/postfix/pop-before-smtp, reject_unauth_destination, reject_invalid_hostname
unknown_local_recipient_reject_code = 550
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:998
virtual_mailbox_base = /home/vmail
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit = 51200000
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 100
virtual_transport = virtual
virtual_uid_maps = static:998
In master.cf I added:
smtp inet n - n - - smtpd
-o content_filter=spamcheck:
spamcheck unix - n n - - pipe
flags=Rq user=spamfilter argv=/usr/bin/spamfilt ${sender} ${recipient}
spamfilt bash script contains:
#!/bin/sh
sender=$1
shift
recip="$@"
if [ "$#" -eq 1 ]; then
/usr/bin/spamc -u $recip
else
/usr/bin/spamc
fi | /usr/sbin/sendmail -i -f $sender -- $recip
exit $?
This exampe is taken from an O'Reilly book for spamassassin... It should work, but it doesn't.
Also I made tests with spamc -c < sample-nonspam.txt and spamc -c < sample-spam.txt and spamc and spamassassin work.
If you have any idea why it isn't working please help


Reply With Quote
