Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 22nd June 2007, 08:44
Andee63 Andee63 is offline
HowtoForge Supporter
 
Join Date: Jan 2007
Location: Bradford, UK
Posts: 40
Thanks: 5
Thanked 0 Times in 0 Posts
Default How do I reject email?

I have a domain with several users/email addresses, ie andrew@mydomain.com I have forwarding setup so that any unknown email is forwarded to andrew@mydomain.com. I previously had two other users who were removed from my system now their emails are forwarded to andrew@mydomain.com. I can't seem to find a way of blocking or rejecting emails coming to these addresses. I am using postfix as the mail server.

Thanks in advance for any help
__________________
Andee
www.elmtreeweb.co.uk

Last edited by Andee63; 22nd June 2007 at 08:46.
Reply With Quote
Sponsored Links
  #2  
Old 22nd June 2007, 11:16
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,461
Thanks: 813
Thanked 5,240 Times in 4,108 Posts
Default

Please have a look at the postfix access map feature:

http://www.postfix.org/access.5.html
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 22nd June 2007, 12:55
Andee63 Andee63 is offline
HowtoForge Supporter
 
Join Date: Jan 2007
Location: Bradford, UK
Posts: 40
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Thanks Till for your reply.

I have added
Code:
user@mydomain.com REJECT Address not known at this server
to the bottom of /etc/postfix/access

I have also added
Code:
smtpd_client_restrictions = check_client_access hash:/etc/postfix/access
to main.cf

I have run
Code:
postmap /etc/postfix/access
and restarted postfix but the email address is still forwarded to my address

Any further help is apreciated
__________________
Andee
www.elmtreeweb.co.uk
Reply With Quote
  #4  
Old 23rd June 2007, 20:52
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,727 Times in 2,565 Posts
Default

What's the output of
Code:
postconf -n
? Any erros in your mail log?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #5  
Old 23rd June 2007, 22:06
Andee63 Andee63 is offline
HowtoForge Supporter
 
Join Date: Jan 2007
Location: Bradford, UK
Posts: 40
Thanks: 5
Thanked 0 Times in 0 Posts
Default

Thanks Falko

Output of postconf -n

Code:
[root@server1 ~]# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = /etc/postfix/local-host-names
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.2.8/README_FILES
sample_directory = /usr/share/doc/postfix-2.2.8/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_host_lookup = native
smtp_tls_note_starttls_offer = yes
smtp_use_tls = yes
smtpd_client_restrictions = check_client_access hash:/etc/postfix/access
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain =
smtpd_sasl_security_options = noanonymous
smtpd_sender_restrictions = check_sender_access hash:/etc/postfix/access
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
unknown_local_recipient_reject_code = 550
output from mail log when message recieved but not rejected

Code:
Jun 23 20:56:43 server1 postfix/smtpd[9658]: connect from web86009.mail.ird.yahoo.com[217.146.188.8]
Jun 23 20:56:43 server1 postfix/smtpd[9658]: AB22A91DBC6: client=web86009.mail.ird.yahoo.com[217.146.188.8]
Jun 23 20:56:43 server1 postfix/cleanup[9663]: AB22A91DBC6: message-id=<785653.36388.qm@web86009.mail.ird.yahoo.com>
Jun 23 20:56:43 server1 postfix/qmgr[18792]: AB22A91DBC6: from=<ahastie@talk21.com>, size=1828, nrcpt=1 (queue active)
Jun 23 20:56:43 server1 postfix/smtpd[9658]: disconnect from web86009.mail.ird.yahoo.com[217.146.188.8]
Jun 23 20:56:46 server1 sendmail[9669]: l5NJuiI4009669: from=hastie.me.uk-andrew, size=135, class=0, nrcpts=1, msgid=<200706231956.l5NJuiI4009669@server1.elmtreedesign.co.uk>, relay=hastie.me.uk-andrew@localhost
Jun 23 20:56:46 server1 postfix/smtpd[9658]: connect from localhost.localdomain[127.0.0.1]
Jun 23 20:56:46 server1 postfix/smtpd[9658]: setting up TLS connection from localhost.localdomain[127.0.0.1]
Jun 23 20:56:46 server1 sendmail[9669]: STARTTLS=client, relay=[127.0.0.1], version=TLSv1/SSLv3, verify=FAIL, cipher=DHE-RSA-AES256-SHA, bits=256/256
Jun 23 20:56:46 server1 postfix/smtpd[9658]: TLS connection established from localhost.localdomain[127.0.0.1]: TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)
Jun 23 20:56:46 server1 postfix/smtpd[9658]: 54C5891E416: client=localhost.localdomain[127.0.0.1], sasl_sender=hastie.me.uk-andrew@server1.elmtreedesign.co.uk
Jun 23 20:56:46 server1 postfix/cleanup[9663]: 54C5891E416: message-id=<200706231956.l5NJuiI4009669@server1.elmtreedesign.co.uk>
Jun 23 20:56:46 server1 sendmail[9669]: l5NJuiI4009669: to=admispconfig@localhost.localdomain, ctladdr=hastie.me.uk-andrew (10025/10012), delay=00:00:02, xdelay=00:00:00, mailer=relay, pri=30135, relay=[127.0.0.1] [127.0.0.1], dsn=2.0.0, stat=Sent (Ok: queued as 54C5891E416)
Jun 23 20:56:46 server1 postfix/qmgr[18792]: 54C5891E416: from=<hastie.me.uk-andrew@server1.elmtreedesign.co.uk>, size=829, nrcpt=1 (queue active)
Jun 23 20:56:46 server1 postfix/smtpd[9658]: disconnect from localhost.localdomain[127.0.0.1]
Jun 23 20:56:46 server1 postfix/local[9680]: 54C5891E416: to=<admispconfig@localhost.localdomain>, relay=local, delay=0, status=sent (delivered to command: /usr/bin/procmail -f-)
Jun 23 20:56:46 server1 postfix/qmgr[18792]: 54C5891E416: removed
Jun 23 20:56:51 server1 postfix/local[9664]: AB22A91DBC6: to=<hastie.me.uk-andrew@mail1.bookowl.co.uk>, orig_to=<tom@hastie.me.uk>, relay=local, delay=8, status=sent (delivered to command: /usr/bin/procmail -f-)
Jun 23 20:56:51 server1 postfix/qmgr[18792]: AB22A91DBC6: removed
The email address I need rejecting is tom@hastie.me.uk. All unknown addresses are forwarded to my mail box andrew@hstie.me.uk
Thanks again
__________________
Andee
www.elmtreeweb.co.uk

Last edited by Andee63; 23rd June 2007 at 22:10.
Reply With Quote
  #6  
Old 24th June 2007, 19:59
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,727 Times in 2,565 Posts
Default

Looks ok. I think you should rather add something like
Code:
check_recipient_access hash:/etc/postfix/access
to smtpd_recipient_restrictions and comment out the smtpd_client_restrictions line.
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
The Following User Says Thank You to falko For This Useful Post:
Andee63 (24th June 2007)
  #7  
Old 24th June 2007, 20:58
Andee63 Andee63 is offline
HowtoForge Supporter
 
Join Date: Jan 2007
Location: Bradford, UK
Posts: 40
Thanks: 5
Thanked 0 Times in 0 Posts
 
Default

Thanks Falko that fixed it.
__________________
Andee
www.elmtreeweb.co.uk
Reply With Quote
Reply

Bookmarks

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
postfix reject email Hellbound General 17 8th January 2007 11:05
Spam emails...bounced from me bschultz General 4 2nd November 2006 23:18
Post reject email @mail.localdomain TheJackal Installation/Configuration 3 28th July 2006 08:39
Multiple MySQL Queries - with Postfix-mysql, courier-authmysql, maildrop-mysql... snowfly HOWTO-Related Questions 4 7th July 2006 04:19
email forwarding locally consumes all resources rdells General 20 1st May 2006 19:43


All times are GMT +2. The time now is 14:26.


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