From: David Touzeau on
Dear

I woulf like to use amavis in multi-postfix instances.
I have created one instance, and i receive this error.
When switching to single instance, i have no error.

I would like to know if my master.cf have some wrong settings :




Jul 12 02:48:17 appliance postfix-mail.touzeau.biz/master[31968]: reload
-- version 2.7.0, configuration /etc/postfix-mail.touzeau.biz
Jul 12 02:48:31 appliance postfix-mail.touzeau.biz/smtpd[16604]: connect
from unknown[192.168.1.240]
Jul 12 02:48:31 appliance postfix-mail.touzeau.biz/smtpd[16604]:
CD52B8411B5: client=unknown[192.168.1.240]
Jul 12 02:48:31 appliance postfix-mail.touzeau.biz/cleanup[16607]:
CD52B8411B5: message-id=<4C3A665E.6060405(a)touzeau.biz>
Jul 12 02:48:31 appliance postfix-mail.touzeau.biz/qmgr[15659]:
CD52B8411B5: from=<david(a)touzeau.eu>, size=593, nrcpt=1 (queue active)
Jul 12 02:48:31 appliance postfix-mail.touzeau.biz/qmgr[15659]: warning:
connect to transport private/smtp-amavis: No such file or directory
Jul 12 02:48:31 appliance postfix-mail.touzeau.biz/smtpd[16604]:
disconnect from unknown[192.168.1.240]
Jul 12 02:48:32 appliance postfix-mail.touzeau.biz/error[16608]:
CD52B8411B5: to=<angelique(a)touzeau.biz>, relay=none, delay=0.34,
delays=0.15/0.04/0/0.15, dsn=4.3.0, status=deferred (mail transport
unavailable)


here it is the content of private :

root(a)appliance:/var/spool/postfix-mail.touzeau.biz/private# ls -la
total 8
drwx------ 2 postfix root 4096 2010-07-12 02:38 .
drwxr-xr-x 24 root root 4096 2010-06-23 04:10 ..
srw-rw-rw- 1 postfix root 0 2010-07-12 01:49 anvil
srw-rw-rw- 1 postfix root 0 2010-07-12 01:49 artica-blacklist
srw-rw-rw- 1 postfix root 0 2010-07-12 01:49 artica-filter
srw-rw-rw- 1 postfix root 0 2010-07-12 01:49 artica-reportquar
srw-rw-rw- 1 postfix root 0 2010-07-12 01:49 artica-reportwbl
srw-rw-rw- 1 postfix root 0 2010-07-12 01:49 artica-spam
srw-rw-rw- 1 postfix root 0 2010-07-12 01:49 artica-whitelist
srw-rw-rw- 1 postfix root 0 2010-07-12 01:49 bounce
srw-rw-rw- 1 postfix root 0 2010-07-12 01:49 bsmtp
srw-rw-rw- 1 postfix root 0 2010-07-12 01:49 defer
srw-rw-rw- 1 postfix root 0 2010-07-12 01:49 discard
srw-rw-rw- 1 postfix root 0 2010-07-12 01:49 error
srw-rw-rw- 1 postfix root 0 2010-07-12 01:49 ifmail
srw-rw-rw- 1 postfix root 0 2010-07-12 01:49 lmtp
srw-rw-rw- 1 postfix root 0 2010-07-12 01:49 local
srw-rw-rw- 1 postfix root 0 2010-07-12 01:49 maildrop
srw-rw-rw- 1 postfix root 0 2010-07-12 01:49 mailman
srw-rw-rw- 1 postfix root 0 2010-07-12 01:49 proxymap
srw-rw-rw- 1 postfix root 0 2010-07-12 01:49 proxywrite
srw-rw-rw- 1 postfix root 0 2010-07-12 01:49 relay
srw-rw-rw- 1 postfix root 0 2010-07-12 01:49 retry
srw-rw-rw- 1 postfix root 0 2010-07-12 01:49 rewrite
srw-rw-rw- 1 postfix root 0 2010-07-12 01:49 scache
srw-rw-rw- 1 postfix root 0 2010-07-12 01:49 scalemail-backend
srw-rw-rw- 1 postfix root 0 2010-07-12 01:49 scan
srw-rw-rw- 1 postfix root 0 2010-07-12 01:49 smtp
srw-rw-rw- 1 postfix root 0 2010-07-12 02:38 smtp-amavis:127.0.0.1:1026
srw-rw-rw- 1 postfix root 0 2010-07-12 01:49 tlsmgr
srw-rw-rw- 1 postfix root 0 2010-07-12 01:49 trace
srw-rw-rw- 1 postfix root 0 2010-07-12 01:49 uucp
srw-rw-rw- 1 postfix root 0 2010-07-12 01:49 verify
srw-rw-rw- 1 postfix root 0 2010-07-12 01:49 virtual
srw-rw-rw- 1 postfix root 0 2010-07-12 01:49 zarafa


Master.cf :


root(a)appliance:/var/spool/postfix-mail.touzeau.biz/private# cat
/etc/postfix-mail.touzeau.biz/master.cf |more
# Postfix master process configuration file. For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
smtp inet n - n - - smtpd
-o content_filter=smtp-amavis:127.0.0.1:1026

submission inet n - n - - smtpd
-o smtpd_etrn_restrictions=reject
-o smtpd_enforce_tls=yes
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject

smtps inet n - n - - smtpd
-o smtpd_tls_wrappermode=yes
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject



smtp-amavis:127.0.0.1:1026 unix - - - - 7 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
-o disable_dns_lookups=yes


192.168.1.228:10026 inet n - n - 2 smtp
-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 smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8,192.168.1.228
-o mynetworks_style=host
-o strict_rfc821_envelopes=yes
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000
-o receive_override_options=no_header_body_checks

pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
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
proxywrite unix - - n - 1 proxymap
smtp unix - - n - - smtp
relay unix - - n - - smtp
-o fallback_relay=
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
scan unix - - n - 10 sm -v
maildrop unix - n n - - pipe
retry unix - - n - - error
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail
($recipient)
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=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender
$recipient

scalemail-backend unix - n n - 2 pipe
flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store
${nexthop} ${user} ${extension}

mailman unix - n n - - pipe
flags=FR user=mail:mail argv=/etc/mailman/postfix-to-mailman.py
${nexthop} ${mailbox}

From: David Touzeau on


On 12/07/2010 03:44, Sahil Tandon wrote:
> On Mon, 2010-07-12 at 02:55:40 +0200, David Touzeau wrote:
>
>> Jul 12 02:48:31 appliance postfix-mail.touzeau.biz/qmgr[15659]:
>> warning: connect to transport private/smtp-amavis: No such file or
>> directory
>>
>> root(a)appliance:/var/spool/postfix-mail.touzeau.biz/private# ls -la
>> srw-rw-rw- 1 postfix root 0 2010-07-12 02:38 smtp-amavis:127.0.0.1:1026
>
> Odd.
>
>> Master.cf :
>> -o content_filter=smtp-amavis:127.0.0.1:1026
>
> You might want to use brackets here to encapsulate the IP.
>
>> smtp-amavis:127.0.0.1:1026 unix - - - - 7 smtp
>
> Why are you using 'inet' service name syntax with the 'unix' service
> type? Remove ':127.0.0.1:1026' and restart Postfix. And unless you
> want chroot, you can change the third '-' to 'n'. To familiarize
> yourself with what is supported in master.cf, see the master(5) manual.
>

thanks for your help but this did not fix the problem nnow postfix claim :

Jul 12 10:16:55 appliance postfix-mail.touzeau.biz/master[31968]: fatal:
/etc/postfix-mail.touzeau.biz/master.cf: line 29: valid hostname or
network address required in "smtp-amavis:127.0.0.1:1026"



i have set this :

smtp inet n - n - - smtpd
-o content_filter=smtp-amavis:[127.0.0.1]:1026

submission inet n - n - - smtpd
-o smtpd_etrn_restrictions=reject
-o smtpd_enforce_tls=yes
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject

smtps inet n - n - - smtpd
-o smtpd_tls_wrappermode=yes
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject



smtp-amavis:127.0.0.1:1026 inet - - n - 7 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
-o disable_dns_lookups=yes


192.168.1.228:10026 inet n - n - 2 smtp
-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 smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8,192.168.1.228
-o mynetworks_style=host
-o strict_rfc821_envelopes=yes
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000
-o receive_override_options=no_header_body_checks

pickup fifo n - n 60 1 pickup
cleanup unix n - n - 0 cleanup
qmgr fifo n - n 300 1 qmgr
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
proxywrite unix - - n - 1 proxymap
smtp unix - - n - - smtp
relay unix - - n - - smtp
-o fallback_relay=
showq unix n - n - - showq
error unix - - n - - error
discard unix - - n - - discar

From: Wietse Venema on
David Touzeau:
> Jul 12 02:48:31 appliance postfix-mail.touzeau.biz/qmgr[15659]: warning:
> connect to transport private/smtp-amavis: No such file or directory

It looks for the name /var/spool/postfix.../private/smtp-amavis

> root(a)appliance:/var/spool/postfix-mail.touzeau.biz/private# ls -la
....
> srw-rw-rw- 1 postfix root 0 2010-07-12 02:38 smtp-amavis:127.0.0.1:1026

That is smtp-amavis with garbage at the end. Remove the garbage
from the name, and do "postfix reload".

Wietse

From: David Touzeau on


On 12/07/2010 12:49, Wietse Venema wrote:
> David Touzeau:
>> Jul 12 02:48:31 appliance postfix-mail.touzeau.biz/qmgr[15659]: warning:
>> connect to transport private/smtp-amavis: No such file or directory
>
> It looks for the name /var/spool/postfix.../private/smtp-amavis
>
>> root(a)appliance:/var/spool/postfix-mail.touzeau.biz/private# ls -la
> ...
>> srw-rw-rw- 1 postfix root 0 2010-07-12 02:38 smtp-amavis:127.0.0.1:1026
>
> That is smtp-amavis with garbage at the end. Remove the garbage
> from the name, and do "postfix reload".
>
> Wietse


many thanks Wietse

it's now working like a charm with this config

# ==========================================================================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ==========================================================================
smtp inet n - n - - smtpd
-o content_filter=smtp-amavis:127.0.0.1:1026

submission inet n - n - - smtpd
-o smtpd_etrn_restrictions=reject
-o smtpd_enforce_tls=yes
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject

smtps inet n - n - - smtpd
-o smtpd_tls_wrappermode=yes
-o smtpd_sasl_auth_enable=yes
-o smtpd_client_restrictions=permit_sasl_authenticated,reject



smtp-amavis unix - - n - 7 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes
-o disable_dns_lookups=yes


192.168.1.228:10026 inet n - n - 2 smtpd
-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 smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=127.0.0.0/8,192.168.1.228
-o mynetworks_style=host
-o strict_rfc821_envelopes=yes
-o smtpd_error_sleep_time=0
-o smtpd_soft_error_limit=1001
-o smtpd_hard_error_limit=1000
-o receive_override_options=no_header_body_check

From: Wietse Venema on
Michael Orlitzky:
> On 07/12/2010 10:58 AM, Victor Duchovni wrote:
> > On Mon, Jul 12, 2010 at 03:17:49PM +0200, David Touzeau wrote:
> >
> >> smtp-amavis unix - - n - 7 smtp
> >> -o smtp_data_done_timeout=1200
> >> -o smtp_send_xforward_command=yes
> >> -o disable_dns_lookups=yes
> >
> > I notice people still using "disable_dns_lookups=yes" long after the
> > reason for doing so became moot.
> >
> > This setting is no longer necessary for content filters, and is rarely,
> > if ever, necessary otherwise. It should be removed from HOWTO guides, ...
> >
>
> If you don't mind, why was it necessary, and why isn't it any longer?
> I've still got it on my amavisd-new instance, and have long forgotten
> where it came from.

The combination of

1) Postfix sending up to 50 recipients per mail transaction.

2) Sending mail for recipients in multiple domains through a
single content filter or gateway host.

3) DNS CNAME expansion of domains in MAIL FROM/RCPT TO commands.

(Postfix no longer does this expansion.)

4) ESMTP command pipelining, meaning that the SMTP client could
buffer up a lot of commands before sending them to the server.

(The Postfix SMTP client now flushes output if the buffered data
is getting old.)

These together could result in the SMTP server timing out when
the DNS CNAME lookups were slow.

Wietse