sender_canonical_maps does not work since I've installed amavisd-new + clamav + spamassassin

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

sender_canonical_maps does not work since I've installed amavisd-new + clamav + spamassassin

Frank Bonnet
hello

I use sender_canonical_maps to rewrite sender addresses
since years.

Due to end of support of vexira anti-virus for mail server
I moved to the amavis-new + clamav + spamassassin
installed from FreeBSD ports.

Everything works well except the sender_canonical_maps
which does not seems to be read/executed anymore.

see below the postconf -n trace

Thanks for any idea :-)


2bounce_notice_recipient = postmaster
address_verify_sender = postmaster
alias_database = hash:/etc/mail/aliases,
ldap:/usr/local/etc/postfix/ldap-aliases.cf
alias_maps = hash:/etc/mail/aliases,
ldap:/usr/local/etc/postfix/ldap-aliases.cf
bounce_notice_recipient = blackhole
command_directory = /usr/local/sbin
config_directory = /usr/local/etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
daemon_directory = /usr/local/libexec/postfix
data_directory = /var/db/postfix
debug_peer_level = 2
debugger_command = PATH=/usr/bin:/usr/X11R6/bin xxgdb
$daemon_directory/$process_name $process_id & sleep 5
default_privs = nobody
delay_notice_recipient = postmaster
disable_vrfy_command = yes
enable_long_queue_ids = yes
error_notice_recipient = postmaster
forward_path = $home/.forward${recipient_delimiter}${extension},
$home/.forward, /var/forward/$user/.forward
html_directory = /usr/local/share/doc/postfix
inet_interfaces = all
inet_protocols = ipv4
local_recipient_maps = hash:/etc/mail/aliases, unix:passwd.byname,
ldap:/usr/local/etc/postfix/ldap-aliases.cf
mail_owner = postfix
mail_spool_directory = /var/mail
mailbox_delivery_lock = fcntl, dotlock
mailbox_size_limit = 0
mailq_path = /usr/local/bin/mailq
manpage_directory = /usr/local/man
message_size_limit = 0
mydestination = $myhostname, esiee.fr , istm.fr, mail.istm.fr,
esiee-management.fr, esiee-paris.fr, esieeparis.fr
mydomain = esiee.fr
myhostname = mail.esiee.fr
mynetworks = xxx.xxx.0.0/16, 127.0.0.0/8
myorigin = $mydomain
newaliases_path = /usr/local/bin/newaliases
parent_domain_matches_subdomains =
queue_directory = /var/spool/postfix
queue_minfree = 1073741824
readme_directory = /usr/local/share/doc/postfix
relay_domains = esiee.fr, istm.fr, esiee-management.fr, esiee-paris.fr,
esieeparis.fr, advancity.eu
relayhost = [x.x.x.x]
relocated_maps = hash:/usr/local/etc/postfix/relocated
sample_directory = /usr/local/etc/postfix
sender_bcc_maps = hash:/usr/local/etc/postfix/sender_bcc
sender_canonical_maps = hash:/usr/local/etc/postfix/sender_canonical
sendmail_path = /usr/local/sbin/sendmail
setgid_group = maildrop
smtpd_banner = $myhostname ESMTP
smtpd_client_restrictions = hash:/usr/local/etc/postfix/access
smtpd_error_sleep_time = 1s
smtpd_etrn_restrictions = reject
smtpd_helo_restrictions =
smtpd_recipient_limit = 200
smtpd_recipient_restrictions = reject_invalid_hostname,
reject_non_fqdn_sender, reject_unknown_recipient_domain,
reject_unauth_pipelining, permit_mynetworks, reject_unauth_destination,
check_recipient_access hash:/usr/local/etc/postfix/bad_recipients, permit
smtpd_sender_restrictions = permit_mynetworks,check_sender_access
hash:/usr/local/etc/postfix/restrictions_access
strict_rfc821_envelopes = yes
transport_maps = hash:/usr/local/etc/postfix/transport
unknown_address_reject_code = 554
virtual_alias_domains = hash:/usr/local/etc/postfix/virtual_alias_domains
virtual_alias_maps = hash:/usr/local/etc/postfix/virtual_alias_maps


Reply | Threaded
Open this post in threaded view
|

Re: sender_canonical_maps does not work since I've installed amavisd-new + clamav + spamassassin

Wietse Venema
Frank Bonnet:

> hello
>
> I use sender_canonical_maps to rewrite sender addresses
> since years.
>
> Due to end of support of vexira anti-virus for mail server
> I moved to the amavis-new + clamav + spamassassin
> installed from FreeBSD ports.
>
> Everything works well except the sender_canonical_maps
> which does not seems to be read/executed anymore.

Do you have "no_address_mappings" in master.cf?

        Wietse
Reply | Threaded
Open this post in threaded view
|

Re: sender_canonical_maps does not work since I've installed amavisd-new + clamav + spamassassin

Frank Bonnet
On 04/16/2013 08:03 PM, Wietse Venema wrote:

> Frank Bonnet:
>> hello
>>
>> I use sender_canonical_maps to rewrite sender addresses
>> since years.
>>
>> Due to end of support of vexira anti-virus for mail server
>> I moved to the amavis-new + clamav + spamassassin
>> installed from FreeBSD ports.
>>
>> Everything works well except the sender_canonical_maps
>> which does not seems to be read/executed anymore.
> Do you have "no_address_mappings" in master.cf?
>
> Wietse

Hello ,

No , here is the master.cf file that is used by this postfix server

Thanks for the quick answer


#
# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp      inet  n       -       n       -       -       smtpd
#submission inet n       -       n       -       -       smtpd
#  -o smtpd_tls_security_level=encrypt
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#smtps     inet  n       -       n       -       -       smtpd
#  -o smtpd_tls_wrappermode=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#  -o milter_macro_daemon_name=ORIGINATING
#628      inet  n       -       n       -       -       qmqpd
pickup    fifo  n       -       n       60      1       pickup
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
proxywrite unix -       -       n       -       1       proxymap
smtp      unix  -       -       n       -       -       smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay     unix  -       -       n       -       -       smtp
         -o smtp_fallback_relay=
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       n       -       -       showq
error     unix  -       -       n       -       -       error
retry     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=bsmtp argv=/usr/local/sbin/bsmtp -f $sender $nexthop
$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=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
#  ${nexthop} ${user}
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
# Added using postfix-add-filter script:
smtp-amavis unix    -       -       -       -       2     smtp
      -o smtp_data_done_timeout=1200
      -o smtp_send_xforward_command=yes
      -o smtp_tls_note_starttls_offer=no

127.0.0.1:10025 inet n    -       -       -       -     smtpd
      -o content_filter=
      -o smtpd_delay_reject=no
      -o smtpd_client_restrictions=permit_mynetworks,reject
      -o smtpd_helo_restrictions=
      -o smtpd_sender_restrictions=
      -o smtpd_recipient_restrictions=permit_mynetworks,reject
      -o smtpd_data_restrictions=reject_unauth_pipelining
      -o smtpd_end_of_data_restrictions=
      -o smtpd_restriction_classes=
      -o mynetworks=127.0.0.0/8
      -o smtpd_error_sleep_time=0
      -o smtpd_soft_error_limit=1001
      -o smtpd_hard_error_limit=1000
      -o smtpd_client_connection_count_limit=0
      -o smtpd_client_connection_rate_limit=0
      -o
receive_override_options=no_header_body_checks,no_unknown_recipient_checks,no_milters
      -o local_header_rewrite_clients=
      -o smtpd_milters=
      -o local_recipient_maps=
      -o relay_recipient_maps=



Reply | Threaded
Open this post in threaded view
|

Re: sender_canonical_maps does not work since I've installed amavisd-new + clamav + spamassassin

Timo Röhling
Am 2013-04-17 10:00, schrieb Frank Bonnet:
>      -o local_header_rewrite_clients=

http://www.postfix.org/ADDRESS_REWRITING_README.html:

NOTE: Postfix versions 2.2 and later rewrite message headers from
remote SMTP clients only if the client matches the
local_header_rewrite_clients parameter, or if the
remote_header_rewrite_domain configuration parameter specifies a
non-empty value. To get the behavior before Postfix 2.2, specify
"local_header_rewrite_clients = static:all"

-Timo

Reply | Threaded
Open this post in threaded view
|

Re: sender_canonical_maps does not work since I've installed amavisd-new + clamav + spamassassin

Frank Bonnet
On 04/17/2013 10:08 AM, Timo Röhling wrote:

> Am 2013-04-17 10:00, schrieb Frank Bonnet:
>>      -o local_header_rewrite_clients=
>
> http://www.postfix.org/ADDRESS_REWRITING_README.html:
>
> NOTE: Postfix versions 2.2 and later rewrite message headers from
> remote SMTP clients only if the client matches the
> local_header_rewrite_clients parameter, or if the
> remote_header_rewrite_domain configuration parameter specifies a
> non-empty value. To get the behavior before Postfix 2.2, specify
> "local_header_rewrite_clients = static:all"
>
> -Timo
>

YEP ! it works :-) thanks a lot !

Frank