Anant Nitya wrote:
> Hi,
> I have sent same mail to postfix-user list, but didn't got any reply maybe 
> someone on this list can give me some information regarding whats going wrong 
> while doing canonical mapping.
>
> I am having a setup of postfix, where few recipient address are getting 
> rewritten before delivering it to cyrus-lmtp using canonical maps and sender 
> address are getting rewritten before sending out to world using generic maps
>
> [CANONICAL_MAPS]
> [EMAIL PROTECTED]  [EMAIL PROTECTED]
>
> [GENERIC_MAPS]
> [EMAIL PROTECTED]  [EMAIL PROTECTED]
>   

note that these will both apply to mail passed to amavisd-new!
> This solution works effectively fine till I put in amavisd-new in scene for 
> content filtering. Now though message from [EMAIL PROTECTED] do get delivered 
> to [EMAIL PROTECTED], message header is not getting rewritten to example.lan 
> as I expected. 
>   

or it was rewritten twice, once by canonical and once by generic?
> I don't know much, though after reading documents I conceived this solution 
> and it was working perfectly fine. I been using mailscanner with my postfix 
> installation but recent changelog of postfix says that mail queue fortmat has 
> one new entry in it and that made me think since I don't want to get my mail 
> lost/corrupted out of blue. Mailscanner is still working visibly fine with 
> latest stable release of postfix, but to avoid problems I wish to switch to 
> amavisd-new, but this problem been a big show stopper for me. I hope someone 
> here would throw some light on this problem so I can start using amavisd-new.
>
> Here is my postconf -n
>
> alias_database = hash:/etc/aliases
> alias_maps = hash:/etc/aliases
> canonical_maps = hash:/etc/postfix/virtmail/canonical
> command_directory = /usr/sbin
> config_directory = /etc/postfix
> daemon_directory = /usr/libexec/postfix
> debug_peer_level = 2
> disable_vrfy_command = yes
> header_checks = regexp:/etc/postfix/header_checks
> html_directory = no
> inet_interfaces = all
> local_destination_concurrency_limit = 5
> local_destination_recipient_limit = 100
> local_recipient_maps = $alias_maps 
> hash:/etc/postfix/homenet_recipient_maps.txt
> mail_owner = postfix
> mailbox_transport = lmtp:mail.homenet.lan
> mailq_path = /usr/bin/mailq.postfix
> manpage_directory = /usr/share/man
> masquerade_domains = $myhostname $mydomain
> masquerade_exceptions = root
> message_strip_characters = \0
> mydestination = $myhostname, localhost.$mydomain, localhost, www.$mydomain, 
> ftp.$mydomain, $mydomain
> mydomain = homenet.lan
> myhostname = mail.homenet.lan
> mynetworks = 127.0.0.0/8, 172.16.4.0/28
> mynetworks_style = host
> myorigin = $mydomain
> newaliases_path = /usr/bin/newaliases.postfix
> queue_directory = /var/spool/postfix
> readme_directory = /usr/share/doc/postfix-2.4.1/README_FILES
> sample_directory = /usr/share/doc/postfix-2.4.1/samples
> sender_dependent_relayhost_maps = hash:/etc/postfix/sender_relay
> sendmail_path = /usr/sbin/sendmail.postfix
> setgid_group = postdrop
> smtp_generic_maps = hash:/etc/postfix/virtmail/generic
> smtp_sasl_auth_enable = yes
> smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
> smtp_sasl_security_options = noanonymous
> smtp_sasl_tls_security_options = noanonymous
> smtp_sender_dependent_authentication = yes
> smtp_use_tls = yes
> smtpd_banner = $myhostname ESMTP $mail_name
> smtpd_delay_reject = yes
> smtpd_helo_required = yes
> smtpd_helo_restrictions = permit_mynetworks,        check_helo_access 
> hash:/etc/postfix/helo_access,        reject_non_fqdn_
> hostname,        reject_invalid_hostname,        permit
> smtpd_recipient_restrictions = reject_unauth_pipelining,        
> reject_non_fqdn_recipient,        warn_if_reject reject_unkn
> own_recipient_domain,        permit_mynetworks,        
> permit_sasl_authenticated,        reject_unauth_destination,        c
> heck_recipient_access regexp:/etc/postfix/recipient_checks.reg, 
> check_policy_service inet:127.0.0.1:10026,        permit
> smtpd_sasl_auth_enable = yes
> smtpd_sasl_authenticated_header = yes
> smtpd_sasl_local_domain = $mydomain
> smtpd_sasl_path = smtpd
> smtpd_sasl_security_options = noanonymous
> smtpd_sasl_tls_security_options = noanonymous
> smtpd_sasl_type = cyrus
> smtpd_sender_restrictions = permit_sasl_authenticated,        
> permit_mynetworks,        warn_if_reject reject_non_fqdn_sende
> r,        warn_if_reject reject_unknown_sender_domain,        permit
> smtpd_use_tls = yes
> soft_bounce = yes
> tls_random_source = dev:/dev/urandom
> unknown_local_recipient_reject_code = 550
> virtual_alias_maps = hash:/etc/postfix/virtmail/virtual
> virtual_mailbox_domains = /etc/postfix/virtmail/virtdomains.txt
> virtual_mailbox_maps = hash:/etc/postfix/virtmail/virtmailboxes.txt
> virtual_transport = lmtp:mail.homenet.lan
>
>
> Here is my master.cf 
> #
> # 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
> #submission inet n       -       n       -       -       smtpd
> #  -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
> #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
> 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
> retry     unix  -       -       n       -       -       error
> #
> # ====================================================================
> # 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=/usr/lib/cyrus-imapd/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=/usr/lib/cyrus-imapd/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
>
> # Dovecot LDA
> dovecot   unix  -       n       n       -       -       pipe
>   flags=DRhu user=virtmail:virtmail argv=/usr/libexec/dovecot/deliver -d 
> ${recipient}
>
> ###############################################################################
> # AMAVISD-NEW
> ###############################################################################
>
> 127.0.0.1:10025 inet n    -       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,172.16.4.2/28
>      -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=
>
>   


- you should disable address rewrite before amavisd-new, and enable it 
after.
- I don't see any content_filter setting.

-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
AMaViS-user mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/amavis-user
AMaViS-FAQ:http://www.amavis.org/amavis-faq.php3
AMaViS-HowTos:http://www.amavis.org/howto/

Reply via email to