Share your knowledge at the LQ Wiki.
Go Back > Forums > Linux Forums > Linux - Server
User Name
Linux - Server This forum is for the discussion of Linux Software used in a server related context.


  Search this Thread
Old 06-25-2008, 02:40 PM   #1
LQ Newbie
Registered: Jun 2008
Posts: 1

Rep: Reputation: 0
stop outgoing mails classified as spam (postfix, spamass)

we've had our own mail server for a few years and i havnt had any issues sending email until ive been sending not from "my network"

I connect in and authenticate with SASL and everything works fine but my emails keep getting classified as spam.

Ive read loads of tutorials and just cant work it out. Below is my master and

Ive hacked about with both of them quite a bit so let me know if anything is clearly wrong. removed most of the comments to cut down size

One thing i have heard of is having another post used for sending main that only works with sasl and doesnt do any checks.

Ive also tried to edit the spamassasin config to get it to leave outgoing mail but no luck!


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

smtp inet n - n - 2 smtpd
-o receive_override_options=no_address_mappings

maildrop unix - n n - - pipe
flags=DRhu user=vmail argv=/usr/local/bin/maildrop -d ${recipient}
scan unix - - n - 2 lmtp
-o disable_dns_lookups=yes
-o lmtp_send_xforward_command=yes
-o lmtp_data_done_timeout=1200

spfpolicy unix - n n - - spawn
user=nobody argv=/usr/bin/perl /etc/postfix/policyd-spf-perl

# Injecting mail back into Postfix after content filter
localhost:10025 inet n - n - 2 smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,reject
-o mynetworks=
-o strict_rfc821_envelopes=yes
-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_unknown_recipient_checks,no_header_body_checks
-o smtpd_authorized_xforward_hosts=

unknown_local_recipient_reject_code = 550

smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes

smtpd_delay_reject = yes
smtpd_helo_required = yes
smtpd_helo_restrictions =
check_helo_access hash:/etc/postfix/helo_allow,

smtpd_sender_restrictions =

smtpd_recipient_restrictions =
#check_sender_access hash:/etc/postfix/sender_access,
check_recipient_access hash:/etc/postfix/recipient_access,
check_policy_service inet:
#SPF checking
check_policy_service unix:/var/spool/postfix/private/spfpolicy


Last edited by tim124; 06-25-2008 at 02:41 PM. Reason: remove domain
Old 06-25-2008, 06:24 PM   #2
Mr. C.
Senior Member
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 59
Show some example log entries that show your mail being rejected as spam.
Old 06-25-2008, 06:29 PM   #3
LQ Guru
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
And the headers from the offending email(s) - at least the spam related headers
Old 06-25-2008, 06:37 PM   #4
Mr. C.
Senior Member
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 59
Sorry, I probably mistook the OPs question as outbound rejections. I see the OP probably means, as billymayday suggests, mail is accepted, but placed in various user's spam/junk folders. The headers would be most appropriate.
Old 06-25-2008, 06:39 PM   #5
LQ Guru
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
No, isn't he saying that when he connects from outside using sasl to send mail to outside that it's getting flagged as spam? I presume the headers will still be added.
Old 06-25-2008, 06:44 PM   #6
Mr. C.
Senior Member
Registered: Jun 2008
Posts: 2,529

Rep: Reputation: 59
The inbound smtpd connection accepts the the users mail mail from his MTA. Then, smtp relays the mail elsewhere. Why remote servers classify this configuration as SPAM requires further investigation. All the mail headers would be relevant and useful. A properly configured mail server should not give trouble based on how a user's submits mail for delivery. But some do, they inspect the headers for Received headers that appear to come from certain ranges.

Last edited by Mr. C.; 06-25-2008 at 06:46 PM.
Old 06-26-2008, 05:50 AM   #7
Registered: Nov 2007
Location: Australia
Distribution: Fedora FC-9 x86-64+i686,CentOS 5.2 i686
Posts: 58

Rep: Reputation: 15
Make sure that your posts have Date:, From: and unique Message-ID: fields. Without those, many spam filters will classify your emails as spam.


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
stop outgoing spam zovres Linux - General 5 04-28-2009 07:16 AM
logging outgoing mails in mailserver????? nics Linux - Server 17 01-01-2009 05:19 AM
No outgoing mails (Hacking ???) bittus Linux - Newbie 8 03-21-2008 08:48 AM
add header information to outgoing e-mails - postfix paul_mat Linux - Networking 1 05-16-2006 05:39 AM
outgoing mails are defered in mailq nayagam Linux - General 1 11-15-2002 08:51 AM

All times are GMT -5. The time now is 12:40 AM.

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