procmail
[Top] [All Lists]

Re: Add X-Envelope From/To into incoming mail

2009-02-12 08:30:09
I have:

main.cf

# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file=/etc/ssl/certs/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = domain.cz
mydomain = domain.cz
append_dot_mydomain = no
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = domain.cz, ubuntu, localhost.localdomain, , localhost
relayhost =  
mynetworks = 127.0.0.0/8, 10.0.10.0/24, 10.0.10.13
home_mailbox = Maildir/
mailbox_command = procmail -Y -a $DOMAIN
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
# relay_domains = 
relay_domains = hash:/etc/postfix/relay
virtual_maps = hash:/etc/postfix/virtual



smtpd_recipient_restrictions = check_recipient_access 
pcre:/etc/postfix/recipient_access
smtpd_data_restrictions = check_sender_access pcre:/etc/postfix/sender_access

################

Where is problem? Sorry I configure Postfix first time. And sorry for main 
english, Im from Czech.



------------ Původní zpráva ------------
Od:  <wietse(_at_)porcupine(_dot_)org>
Předmět: Re: Add X-Envelope From/To into incoming mail
Datum: 12.2.2009 14:20:51
----------------------------------------
Follow the instruction in the logfile message.

      Wietse

Petr Hude?ek:
[ Charset ISO-8859-2 unsupported, converting... ]
X-Envelope From: woking fine, but X-Envelope To: not work.
log messages:  
Feb 12 14:01:19 ubuntu postfix/smtpd[29426]: fatal: parameter
"smtpd_recipient_restrictions": specify at least one working instance of:
check_relay_domains, reject_unauth_destination, reject, defer or
defer_if_permit
Feb 12 14:01:20 ubuntu postfix/master[29417]: warning: process
/usr/lib/postfix/smtpd pid 29426 exit status 1
Feb 12 14:01:20 ubuntu postfix/master[29417]: warning: 
/usr/lib/postfix/smtpd:
bad command startup -- throttling



------------ P_vodn_ zpr_va ------------
Od:  <wietse(_at_)porcupine(_dot_)org>
P_edm_t: Re: Add X-Envelope From/To into incoming mail
Datum: 12.2.2009 13:19:45
----------------------------------------
Petr Hude?ek:
Hi everybody!
I need add X-Envelope From: and X-Envelope To: into incoming mail from
envelope mail, no from head mail! I use Postfix and procmail. Can you help
me,
please?

Use PREPEND actions in access maps.

http://www.postfix.org/SMTPD_ACCESS_README.5.html
http://www.postfix.org/access.5.html
http://www.postfix.org/postconf.5.html#check_sender_access
http://www.postfix.org/postconf.5.html#check_recipient_access

/etc/postfix/main.cf:
    smtpd_recipient_restrictions = 
  check_recipient_access pcre:/etc/postfix/recipient_access
    smtpd_data_restrictions = 
  check_sender_access pcre:/etc/postfix/sender_access

/etc/postfix/sender_access:
   /(.*)/  prepend X-Envelope-From: <$1>

/etc/postfix/check_recipient_access:
   /(.*)/  prepend X-Envelope-To: <$1>

Beware, this breaks the privacy of BCC recipients.

  Wietse









____________________________________________________________
procmail mailing list   Procmail homepage: http://www.procmail.org/
procmail(_at_)lists(_dot_)RWTH-Aachen(_dot_)DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail