Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Another always_bcc problem..

15 views
Skip to first unread message

ivak...@gmail.com

unread,
Apr 19, 2007, 8:34:51 AM4/19/07
to
Hello everybody.
I have a problem with always_bcc behaviour in my freebsd 6.2 RC +
postfix, updated from 2.2.8 to 2.4.0. I have
always_bcc = postb...@mydomain.com
in my main.cf. Also i have antivirus and spamassassin and postgrey in
my configuration.
The situation:
==========
cat main.cf
--------------------
address_verify_negative_expire_time = 31d
address_verify_negative_refresh_time = 7h
address_verify_poll_count = 7
address_verify_poll_delay = 5s
address_verify_positive_expire_time = 100d
address_verify_positive_refresh_time = 50d
address_verify_sender = pin...@mydomain.com #to verify sender
always_bcc = postb...@mydomain.com #to store all the mail
default_rbl_reply = $rbl_code Service unavailable for [$rbl_what]. Tnx
we dont need a spam.
disable_vrfy_command = yes
header_checks = regexp:/etc/postfix/header_checks
inet_interfaces = xx.xx.xx.xx
ipc_idle = 100s
mailbox_size_limit = 102400000
message_size_limit = 30720000
minimal_backoff_time = 1000s
mydestination = $myhostname, localhost.$mydomain,
localhost.localdomain
mynetworks = yy.yy.yy.yy, 127.0.0.0/8
smtp_always_send_ehlo = no
smtp_helo_name = $virtual_mailbox_domains
smtp_never_send_ehlo = yes
smtpd_banner = $virtual_mailbox_domains ESMTP QMail v1.24 #tryin to
hide here
smtpd_client_restrictions =
permit_mynetworks,
regexp:/etc/postfix/servers_check_regex,
reject_unauth_pipelining
smtpd_helo_required = yes
smtpd_recipient_restrictions =
permit_mynetworks,
reject_unauth_destination,
reject_invalid_hostname,
reject_non_fqdn_sender,
reject_non_fqdn_recipient,
reject_unknown_sender_domain,
reject_unknown_recipient_domain,
reject_rbl_client list.dsbl.org,
reject_rbl_client bl.spamcop.net,
check_policy_service inet:127.0.0.1:139 #that is my postgrey
deamon running separately from postfix
smtpd_sender_restrictions =
regexp:/etc/postfix/sender_rest_regexp,
reject_non_fqdn_sender,
reject_unknown_sender_domain,
reject_unverified_sender
strict_rfc821_envelopes = yes
virtual_alias_maps = hash:/etc/postfix/virtual
virtual_gid_maps = static:5000
virtual_mailbox_base = /usr/vmail
virtual_mailbox_domains = mydomain.com
virtual_mailbox_limit = 51200000
virtual_mailbox_maps = hash:/etc/postfix/vusers
virtual_minimum_uid = 5000
virtual_transport = virtual
virtual_uid_maps = static:5000
-----------------------------
cat master.cf
-----------------------------
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
#
==========================================================================
smtp inet n - n - - smtpd -o
content_filter=spamassassin #that is my spamassassin
#submission inet n - n - - smtpd
# -o smtpd_etrn_restrictions=reject
# -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#smtps inet n - n - - smtpd
# -o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes
#submission inet n - n - - smtpd
# -o smtpd_etrn_restrictions=reject
# -o smtpd_enforce_tls=yes -o smtpd_sasl_auth_enable=yes
#628 inet n - n - - qmqpd
pickup fifo n - n 60 1 pickup
##<KIS55> ## Added by Kaspersky Anti-Virus Installer ##
-o content_filter=lmtp:127.0.0.1:10030
## Added by Kaspersky Anti-Virus Installer ##<KIS55>
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - n 300 1 oqmgr
tlsmgr unix - - n 1000? 1 tlsmgr
rewrite unix - - n - - trivial-
rewrite
bounce unix - - n - 0 bounce
defer unix - - n - 0 bounce
trace unix - - n - 0 bounce
verify unix - - n - 1 verify
flush unix n - n 1000? 0 flush
proxymap unix - - n - - proxymap
smtp unix - - n - - smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX
loops
relay unix - - n - - smtp
-o fallback_relay=
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - n - - showq
error unix - - n - - error
discard unix - - n - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - n - - lmtp
anvil unix - - n - 1 anvil
scache unix - - n - 1 scache
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent. See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
#
# The Cyrus deliver program has changed incompatibly, multiple times.
#
old-cyrus unix - n n - - pipe
flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} $
{user}
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
cyrus unix - n n - - pipe
user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} $
{user}
#
# See the Postfix UUCP_README file for configuration details.
#
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail
($recipient)
#
# Other external delivery methods.
#
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop
($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=foo argv=/usr/local/sbin/bsmtp -f $sender $nexthop
$recipient

spamassassin unix - n n - - pipe
user=dovecot argv=/usr/local/bin/spamc -e /usr/sbin/sendmail -oi -f $
{sender} ${recipient} #thats how spamassassin runs

#<KIS55> # THAT IS MY Antivirus
127.0.0.1:10030 inet n n n - 20 spawn
user=kluser argv=/usr/local/share/kav/5.5/kav4mailservers/bin/
smtpscanner
127.0.0.1:10031 inet n - n - 21 smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000
-o myhostname=qnd
#<KIS55>
retry unix - - n - - error
------------------------------
===================================

Postgray running from rc.d/postgrey.sh at start time with:
postgrey_flags=${postgrey_flags:-"--pidfile=${postgrey_pidfile} \
--inet=139 -d --user=postgrey --group=postgrey --dbdir=/var/db/
postgrey \
--whitelist-clients=/etc/postfix/postgrey_whitelist_clients \
--whitelist-recipients=/etc/postfix/
postgrey_whitelist_recipients \
--delay=120 --max-age=30 --greylist-
text="Temporary_not_available." \
--auto-whitelist-clients=1"}
THIS CONFIGURATION works fine on postfix 2.2.8, i had a copy of all
mail to postb...@mydomain.com. BUT when i upgrade to postfix 2.4.0
it stops work normaly.. Now i have 2 copy for postb...@mydomain.com
for each incoming and outgoing mail.
Than i start to dig google groups and found a solution to add `-o
receive_override_options=no_address_mappings` to my master.cf like
that:
#<KIS55> # THAT IS MY Antivirus
127.0.0.1:10030 inet n n n - 20 spawn
user=kluser argv=/usr/local/share/kav/5.5/kav4mailservers/bin/
smtpscanner
127.0.0.1:10031 inet n - n - 21 smtpd
-o receive_override_options=no_address_mappings #that is my solution
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000
-o myhostname=qnd
#<KIS55>

Now it works fine, only one copy sends to postb...@mydomain.com. BUT
i have strange thigs in log after this (look at the comments in
following piece of log):
================================================
Apr 19 09:10:19 mailer postfix/smtpd[92608]: 34D3541A0: client=dxb-
b14346.alshamil.net.ae[83.110.209.28]
#here i got the connection
Apr 19 09:10:19 mailer postfix/cleanup[92617]: 34D3541A0: message-
id=<172872638.93...@thebat.net>
Apr 19 09:10:34 mailer postfix/qmgr[81862]: 34D3541A0:
from=<r.k...@smhhou.com>, size=15512, nrcpt=2 (queue active)
#ok, we have a mail. spamassassin first
Apr 19 09:10:34 mailer spamd[607]: spamd: connection from
localhost.ktz [127.0.0.1] at port 59007
Apr 19 09:10:34 mailer spamd[607]: spamd: setuid to dovecot succeeded
Apr 19 09:10:34 mailer spamd[607]: spamd: processing message
<172872638.93...@thebat.net> for dovecot:1003
Apr 19 09:10:34 mailer postfix/smtpd[92608]: disconnect from dxb-
b14346.alshamil.net.ae[83.110.209.28]
#its a clean mail, moving next
Apr 19 09:10:35 mailer spamd[607]: spamd: clean message (5.8/8.0) for
dovecot:1003 in 1.0 seconds, 15262 bytes.
Apr 19 09:10:35 mailer spamd[607]: spamd: result: . 5 -
BAYES_99,DATE_IN_FUTURE_03_06,FROM_ILLEGAL_CHARS,HTML_COMMENT_SAVED_URL,HTML_MESSAGE,RCVD_IN_NJABL_DUL,USER_IN_WHITELIST_TO
scantime=1.0,size=15262,user=dovecot,uid=1003,required_score=8.0,rhost=localhost.ktz,raddr=127.0.0.1,rport=59007,mid=<172872638.93...@thebat.net>,bayes=1,autolearn=no
Apr 19 09:10:35 mailer postfix/pipe[92642]: 34D3541A0:
to=<b...@mydomain.com>, relay=spamassassin, delay=22,
delays=21/0.01/0/1.1, dsn=2.0.0, status=sent (delivered via
spamassassin service)
Apr 19 09:10:35 mailer postfix/pipe[92642]: 34D3541A0:
to=<postb...@mydomain.com>, relay=spamassassin, delay=22,
delays=21/0.01/0/1.1, dsn=2.0.0, status=sent (delivered via
spamassassin service)
#BEGINING OF STRANGE THINGS
Apr 19 09:10:35 mailer postfix/qmgr[81862]: 34D3541A0: removed
Apr 19 09:10:35 mailer postfix/pickup[92141]: 7AA2641B3: uid=1003
from=<r.k...@smhhou.com>
Apr 19 09:10:35 mailer postfix/cleanup[92617]: 7AA2641B3: message-
id=<172872638.93...@thebat.net>
Apr 19 09:10:35 mailer postfix/qmgr[81862]: 7AA2641B3:
from=<r.k...@smhhou.com>, size=15917, nrcpt=3 (queue active)
Apr 19 09:10:35 mailer spamd[531]: prefork: child states: II
Apr 19 09:10:35 mailer postfix/smtpd[92659]: connect from
localhost.ktz[127.0.0.1]
Apr 19 09:10:35 mailer postfix/smtpd[92659]: E482241BF:
client=localhost.ktz[127.0.0.1]
Apr 19 09:10:36 mailer postfix/cleanup[92617]: E482241BF: message-
id=<172872638.93...@thebat.net>
Apr 19 09:10:36 mailer postfix/qmgr[81862]: E482241BF:
from=<r.k...@smhhou.com>, size=16162, nrcpt=2 (queue active)
Apr 19 09:10:36 mailer postfix/smtpd[92659]: disconnect from
localhost.ktz[127.0.0.1]
Apr 19 09:10:36 mailer postfix/lmtp[92652]: 7AA2641B3:
to=<b...@mydomain.com>, relay=127.0.0.1[127.0.0.1]:10030, delay=0.57,
delays=0.03/0.01/0.03/0.5, dsn=2.0.0, status=sent (250 2.0.0
<b...@mydomain.com> Ok)
Apr 19 09:10:36 mailer postfix/virtual[92660]: E482241BF:
to=<b...@mydomain.com>, relay=virtual, delay=0.13,
delays=0.11/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to maildir)
#HERE
Apr 19 09:10:36 mailer postfix/lmtp[92652]: 7AA2641B3:
to=<postb...@mydomain.com>, relay=127.0.0.1[127.0.0.1]:10030,
delay=0.59, delays=0.03/0.01/0.03/0.51, dsn=2.0.0, status=sent (250
2.0.0 <postb...@mydomain.com> Ok)
#AND HERE TOO
Apr 19 09:10:36 mailer postfix/lmtp[92652]: 7AA2641B3:
to=<postb...@mydomain.com>, relay=127.0.0.1[127.0.0.1]:10030,
delay=0.59, delays=0.03/0.01/0.03/0.52, dsn=2.0.0, status=sent (250
2.0.0 <postb...@mydomain.com> Ok)
Apr 19 09:10:36 mailer postfix/virtual[92660]: E482241BF:
to=<postb...@mydomain.com>, relay=virtual, delay=0.14,
delays=0.11/0.01/0/0.01, dsn=2.0.0, status=sent (delivered to maildir)
Apr 19 09:10:36 mailer postfix/qmgr[81862]: E482241BF: removed
Apr 19 09:10:36 mailer postfix/qmgr[81862]: 7AA2641B3: removed
#END OF STRANGE THINGS
=========================================

Can anybody explain me, whats happening between BEGINING an END OF
STRANGE THINGS? i "solved" double copy problem to always_bcc, but im
not sure it was correct. Why i got 2 lmtp status=sent messages for
postb...@mydomain.com, marked #HERE #AND HERE TOO? But it only one
"delivered to maildir" for him...
Any ideas? Tnx for all help!
(sorry for my english, im russian actually :)

ivak...@gmail.com

unread,
Apr 20, 2007, 1:26:06 AM4/20/07
to
And another strange fact. That is Antivirus log per 1 message:
[20/04/07 09:19:51 I] [25895] l3K9JoZ00025895 <--
from=<Gorb...@mydomain.com>
[20/04/07 09:19:51 I] [25895] l3K9JoZ00025895 <--
message_id=<<001701c7830b$876f3680$2037...@some.net>>
[20/04/07 09:19:51 I] [25895] l3K9JoZ00025895
===group=<default>,from=<Gorb...@mydomain.com>,to=<sa...@hnt.ru>,check
result=<clean>
[20/04/07 09:19:51 I] [25895] l3K9JoZ00025895 === group=<default>,
from=<Gorb...@mydomain.com>,to=<postb...@mydomain.com>,check
result=<clean>
[20/04/07 09:19:51 I] [25895] l3K9JoZ00025895 === group=<default>,
from=<Gorb...@mydomain.com>,to=<postb...@mydomain.com>,check
result=<clean>
[20/04/07 09:19:51 I] [25895] l3K9JoZ00025895 -->
to=<sa...@hnt.ru>,status=<send>
#HERE
[20/04/07 09:19:51 I] [25895] l3K9JoZ00025895 -->
to=<postb...@mydomain.com>,status=<send>
#AND HERE
[20/04/07 09:19:51 I] [25895] l3K9JoZ00025895 -->
to=<postb...@mydomain.com>,status=<send>

I mean it scan it twice... Something is wrong...


ivak...@gmail.com

unread,
Apr 20, 2007, 3:49:36 AM4/20/07
to
Help me to configure the scheme:

[incoming mail] ----> (rbl,header, body,hostname and other checks)
------|if ok|----->(postgrey) ------> (antivirus) -------->
(spamassassin) -------> /delivered do recipient and to always_bcc
maildirs/

Big tnx for help!


ivak...@gmail.com

unread,
Apr 27, 2007, 8:02:29 AM4/27/07
to
On 19 апр, 16:34, ivakr...@gmail.com wrote:
> Hello everybody.
> I have a problem with always_bcc behaviour in my freebsd 6.2 RC +
> postfix, updated from 2.2.8 to 2.4.0. I have
> always_bcc = postbac...@mydomain.com

> in my main.cf. Also i have antivirus and spamassassin and postgrey in
> my configuration.

I would glad to see every usefull links or any other help.
FILTER_README is very poor.

0 new messages