LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 05-15-2006, 10:29 PM   #1
paul_mat
Member
 
Registered: Nov 2004
Location: Townsville, Australia
Distribution: Fedora Core 5, CentOS 4, RHEL 4
Posts: 855

Rep: Reputation: 30
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 = unixasswd.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

Last edited by paul_mat; 05-15-2006 at 10:30 PM.
 
Old 05-16-2006, 05:39 AM   #2
scowles
Member
 
Registered: Sep 2004
Location: Texas, USA
Distribution: Fedora
Posts: 620

Rep: Reputation: 31
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
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
postfix outgoing port ? taiwf Linux - Software 4 07-06-2006 10:59 AM
postfix X-extra-header-information: paul_mat Linux - Software 1 05-16-2006 04:10 PM
Add text to outgoing emails Jobbie Linux - Software 4 11-28-2005 05:22 PM
Postfix - Don't masquerade Local only Outgoing mail... Help please... Vince0000 Linux - General 2 11-27-2003 09:08 AM
outgoing mails are defered in mailq nayagam Linux - General 1 11-15-2002 08:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 04:10 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration