LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   add header information to outgoing e-mails - postfix (https://www.linuxquestions.org/questions/linux-networking-3/add-header-information-to-outgoing-e-mails-postfix-445206/)

paul_mat 05-15-2006 10:29 PM

add header information to outgoing e-mails - postfix
 
hi there,

i'm running a RHEL4, postfix, bitdefender mail setup at the moment.

i'm trying to get postfix to mark every e-mail header sent from postfix with this line.

X-Trusted-localdomain: yes

I've added the following two lines to the /etc/postfix/main.cf file

smtpd_data_restrictions = check_client_access
cidr:/etc/postfix/add_local_header

and then add the following information to the /etc/postfix/add_local_header file.

# add_local_header
# list all local networks here
127.0.0.0/8 PREPEND X-Trusted-localdomain: yes

but it seams to add that header to all e-mails comming into my system from an outside mail server, I just want to add that to the e-mails leaving my mail server.

Can someone help me out?

here is my postconf -n

alias_maps = hash:/etc/aliases, hash:/etc/postfix/ldap-aliases, hash:/var/lib/mailman/data/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = smtp:127.0.0.1:10025
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
fallback_transport = procmail
hash_queue_names = incoming,active, deferred, bounce, defer, flush, hold, trace
html_directory = no
local_recipient_maps = unix:passwd.byname $alias_maps hash:/etc/postfix/usernames_forlocalmaps
mailbox_command = /usr/bin/procmail
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain, $mydomain
myhostname = mail.example.com
mynetworks = 192.168.0.0/23, 192.168.100.0/24, 127.0.0.0/8
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
readme_directory = /usr/share/doc/postfix-2.1.5/README_FILES
recipient_delimiter = +
sample_directory = /usr/share/doc/postfix-2.1.5/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
unknown_local_recipient_reject_code = 550

scowles 05-16-2006 05:39 AM

I haven't tried the method of adding header info as you have shown, but I stop spamassassin from processing outbound e-mail by adding "permit_mynetworks" BEFORE the call to the spamassassin filter? So using your example, try:

Code:

smtpd_data_restrictions =
permit_mynetworks
check_client_access cidr:/etc/postfix/add_local_header



All times are GMT -5. The time now is 07:03 AM.