Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 12th November 2009, 14:55
filfish filfish is offline
Junior Member
 
Join Date: Feb 2009
Posts: 15
Thanks: 2
Thanked 2 Times in 1 Post
Default relay_recipients issue with spamsnake on ubuntu 8.04

Hi

We've been running the perfect spamsnake for about 8 months on ubuntu 8.04 we're mostly happy with it excluding a couple of issues we're working on in another thread.

We've been using the relay_recipients file with just the domain in
@anydomain.com OK

But have now sorted out the scheduling of exporting the 8000 email addresses from our exchange box over to the spamsnake, so I tried filing the relay recipients file with the 8000+ emails all with a space and OK at the end, ran postmap /etc/postfix/relay_recipients and even gave postfix a restart.

even with that done we still see emails to <anyone>@anydomain.com getting through even though those email addresses are not in the relay_recipient file.

Am i missing another step or using the wrong file even?

cheers

Phil
__________________
"Necessity, who is the mother of invention." Plato, The Republic
Greek author & philosopher in Athens (427 BC - 347 BC)

"Invention, who is the mother of all necessity." Filfish
Reply With Quote
Sponsored Links
  #2  
Old 13th November 2009, 05:26
Rocky Rocky is offline
Senior Member
 
Join Date: Oct 2005
Posts: 553
Thanks: 14
Thanked 49 Times in 48 Posts
Default

Stupid question but have you commented out @anydomain.com OK? If you didn't, that would be your reason why emails are still going through.
__________________
Home of the SpamSnake
Reply With Quote
  #3  
Old 13th November 2009, 10:20
filfish filfish is offline
Junior Member
 
Join Date: Feb 2009
Posts: 15
Thanks: 2
Thanked 2 Times in 1 Post
Default

Quote:
Originally Posted by Rocky View Post
Stupid question but have you commented out @anydomain.com OK? If you didn't, that would be your reason why emails are still going through.
Yes, I renamed the original relay_recipients to relay_recipients.old then created a new file with all the emails in and did the postmap on the new file.

Although I've not yet had a good look through the traffic this morning, as of midnight last night there was a significant drop in traffic, I'll try to look through to see any email addresses that shouldn't be there
__________________
"Necessity, who is the mother of invention." Plato, The Republic
Greek author & philosopher in Athens (427 BC - 347 BC)

"Invention, who is the mother of all necessity." Filfish
Reply With Quote
  #4  
Old 13th November 2009, 10:29
filfish filfish is offline
Junior Member
 
Join Date: Feb 2009
Posts: 15
Thanks: 2
Thanked 2 Times in 1 Post
Default

Ok, having had a quick look through the recent messages, emails are still flowing to addresses not in my relay_recipients file, although it's not the end of the world it would be nice to tie this one down.

Cheers
__________________
"Necessity, who is the mother of invention." Plato, The Republic
Greek author & philosopher in Athens (427 BC - 347 BC)

"Invention, who is the mother of all necessity." Filfish
Reply With Quote
  #5  
Old 13th November 2009, 16:38
Rocky Rocky is offline
Senior Member
 
Join Date: Oct 2005
Posts: 553
Thanks: 14
Thanked 49 Times in 48 Posts
Default

Hey,

Make sure to delete the relay_recipients.db file also and then repostmap your new relay_recipients file so that it recreates the db file.

Restart postfix and you should be good to go.
__________________
Home of the SpamSnake
Reply With Quote
  #6  
Old 17th November 2009, 14:11
filfish filfish is offline
Junior Member
 
Join Date: Feb 2009
Posts: 15
Thanks: 2
Thanked 2 Times in 1 Post
Default

Well, I did as advised, deleted the relay_recipients.db file deleted all versions of my relay_recipients file to ensure I didn't use the wrong one, then added the 8200 email addresses to a new relay_recipients file, ran "postmap /etc/postfix/relay_recipents" restarted postfix and for good measure even restarted the server.

After a few days of testing I can confirm that <any_rubbish@mydomain.com> still comes through, but oddly, it is only @mydomain.com that get through so it is filtering against the domain name, just not the full email address.
__________________
"Necessity, who is the mother of invention." Plato, The Republic
Greek author & philosopher in Athens (427 BC - 347 BC)

"Invention, who is the mother of all necessity." Filfish
Reply With Quote
  #7  
Old 18th November 2009, 14:19
Rocky Rocky is offline
Senior Member
 
Join Date: Oct 2005
Posts: 553
Thanks: 14
Thanked 49 Times in 48 Posts
Default

Please post your main.cf.

The reason it's only allowing your domain to pass through is because it's defined in your relay_domains file.
__________________
Home of the SpamSnake
Reply With Quote
  #8  
Old 18th November 2009, 16:22
filfish filfish is offline
Junior Member
 
Join Date: Feb 2009
Posts: 15
Thanks: 2
Thanked 2 Times in 1 Post
Default

Hi Rocky, Thanks

Below is my main.cf as requested, i've swapped out my actual domain name for 'anydomain.com' and my IP for '123.456.789.0'

I've noticed there is no reference in this file to a relay_recipients hash, i think this could be the problem!


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 = mailgate.anydomain.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = anydomain.com
mydestination =
relayhost =
mynetworks = 127.0.0.0/8, 123.456.789.0/24
message_size_limit = 20480000
mailbox_size_limit =
recipient_delimiter = +
inet_interfaces = all
local_transport = error:No local mail delivery
local_recipient_maps =
virtual_alias_maps = hash:/etc/postfix/virtual
check_recipient_access = hash:/etc/postfix/recv_access
transport_maps = hash:/etc/postfix/transport
relay_domains = hash:/etc/postfix/relay_domains
smtpd_helo_required = yes
smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/sender_access, reject_non_fqdn_sender, reject_unknown_sender_domain
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject _unauth_destination, check_policy_service inet:127.0.0.1:2525
smtpd_data_restrictions = reject_unauth_pipelining
header_checks = regexp:/etc/postfix/header_checks
__________________
"Necessity, who is the mother of invention." Plato, The Republic
Greek author & philosopher in Athens (427 BC - 347 BC)

"Invention, who is the mother of all necessity." Filfish
Reply With Quote
  #9  
Old 18th November 2009, 18:38
Rocky Rocky is offline
Senior Member
 
Join Date: Oct 2005
Posts: 553
Thanks: 14
Thanked 49 Times in 48 Posts
Default

You are correct and it confirms what I thought was the problem.

Insert this into your main.cf:

relay_recipient_maps = hash:/etc/postfix/relay_recipients or the name of your relay recipients file.

Then reboot postfix and you should be good to go.
__________________
Home of the SpamSnake
Reply With Quote
The Following User Says Thank You to Rocky For This Useful Post:
filfish (19th November 2009)
  #10  
Old 19th November 2009, 10:03
filfish filfish is offline
Junior Member
 
Join Date: Feb 2009
Posts: 15
Thanks: 2
Thanked 2 Times in 1 Post
 
Default

Thanks Rocky

I believe that has sorted it, now all that's left is cleaning the database but more RAM should fix that one.

Thanks again for the great spamsnake and your assistance getting it sorted.
__________________
"Necessity, who is the mother of invention." Plato, The Republic
Greek author & philosopher in Athens (427 BC - 347 BC)

"Invention, who is the mother of all necessity." Filfish
Reply With Quote
Reply

Bookmarks

Tags
postfix, spamsnake

Thread Tools
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MailWatch Error: no rows retrieved from database sergio.arnaldo Server Operation 25 21st March 2011 06:05
MailScanner trouble with DBD-MYSQL sergio.arnaldo Server Operation 11 26th August 2009 18:08
Unbale to login to Postfix from webmail wasimriz HOWTO-Related Questions 5 6th April 2009 13:49
Errors after following The Perfect SpamSnake (Ubuntu 8.04) hvrossum HOWTO-Related Questions 21 27th June 2008 17:14
SpamSnake SpamAssassin not working? getrav HOWTO-Related Questions 5 23rd June 2008 23:02


All times are GMT +2. The time now is 06:02.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.