Log inUsernamePassword
Log me on automatically each visit    
Register
Register
Log in to check your private messages
Log in to check your private messages
SMS Forum Index » Installation Support

Post new topic   Reply to topic
mail relay/gateway to internal mail server
View previous topic :: View next topic  
Author Message
Busta
-{ D.O.N.A.T.O.R. }-


Joined: 13 Aug 2007
Posts: 81

PostPosted: Mon Feb 18, 2008 6:51 pm    Post subject: mail relay/gateway to internal mail server Reply with quote

SMS set up would be perfect as an internal mail av scanner/spam gateway but issues come up when relaying mail to internal.

"Recipient address rejected: User unknown in local recipient table"

I have the relay_domains configured , and transport maps configured and hashed to point to the internal mail server, header_checks configured, mynetworks, and relay_recipients map configured and hashed. According to Postfix docs, Postfix should accept recipients that are listed in the $relay_domains and/or $mydestination list. I have these domains listed correctly.

below is my main.cf --
=======

alias_database = hash:/etc/mail/aliases
alias_maps = hash:/etc/mail/aliases, nis:mail.aliases
broken_sasl_auth_clients = yes
command_directory = /usr/sbin/
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
home_mailbox = Maildir/
local_recipient_maps = $alias_maps unix:passwd.byname $virtual_mailbox_maps
mail_spool_directory = /var/spool/mail
mailq_path = /usr/sbin/mailq
manpage_directory = /usr/man
milter_default_action = accept
mydestination = $mydomain, $myhostname, localhost.$mydomain, domain1.tld, domain2.tld
mydomain = internal.domain
myhostname = mailgw
newaliases_path = /usr/sbin/newaliases
relayhost = [ip.addr.internal.mail.server]
relay_domains = $mydomain, $virtual_mailbox_domains, domain1.tld, domain2.tld
sample_directory = /etc/postfix/sample
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtp_use_tls = no
smtpd_milters = unix:/var/run/clamav-milter/milter.sock
smtpd_recipient_restrictions = permit_mynetworks, permit_auth_destination, defer
smtpd_sasl_auth_enable = yes
smtpd_sasl_local_domain = $mydomain
smtpd_sasl_security_options = noanonymous
smtpd_use_tls = no
header_checks = regexp:/etc/postfix/header_checks
transposrt_maps = hash:/etc/postfix/transport
unknown_local_recipient_reject_code = 550
virtual_alias_maps = ldap:/etc/postfix/ldap-aliases.cf,ldap:/etc/postfix/ldap-maillists.cf
transport_maps = hash:/etc/postfix/transport

==========
I suspect it may be the virtual map/ ldap parameters causing the issue, but I have modified and commented these out with no success.

Basically I want sms to receive any email going to specific users in domain1 and domain2, do av and spam scan, then (if pass) relay to internal mail server.

Any help would be appreciated - thanks
Back to top
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1757
Location: Greece

PostPosted: Mon Feb 18, 2008 7:35 pm    Post subject: Reply with quote

What /var/log/maillog says.
If you don't use virtual_alias then commented out, or if you are not using ldap then use hash:/etc/postfix/virtual
From a quick look I saw that you have
local_recipient_maps = $alias_maps unix:passwd.byname $virtual_mailbox_maps
You don't have the
virtual_mailbox_maps =
SMS by default has ldap:/etc/postfix/ldap-users.cf so you might want to remove $virtual_mailbox_maps

Do you want to have local delivery and forward some mail domains to an internal server, or you want to have an firewall/gateway mail server that forwards mails to an internal server, but disabled the local delivery?

gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
Busta
-{ D.O.N.A.T.O.R. }-


Joined: 13 Aug 2007
Posts: 81

PostPosted: Mon Feb 18, 2008 9:05 pm    Post subject: Reply with quote

Right now I am looking at a relay only with no local accounts. I would like to move to a relay with local accounts at some point in the future, but right now relay only to internal mail server.
Back to top
View user's profile Send private message
gerasimos_h
Site Admin


Joined: 09 Aug 2007
Posts: 1757
Location: Greece

PostPosted: Mon Feb 18, 2008 9:29 pm    Post subject: Reply with quote

have you read that:
http://www.postfix.org/STANDARD_CONFIGURATION_README.html#firewall

Remove things you don't use from main.cf e.g. sasl lines, from what I see you don't use sasl authentication...
I believe you wouldn't have any problems if you light your main.cf.
/var/log/maillog doesn't return errors?

gerasimos_h

_________________
Superb! Mini Server Project Manager
http://sms.it-ccs.com
Back to top
View user's profile Send private message Visit poster's website
Busta
-{ D.O.N.A.T.O.R. }-


Joined: 13 Aug 2007
Posts: 81

PostPosted: Mon Feb 18, 2008 10:03 pm    Post subject: Reply with quote

yep, I followed it - went with the example config but did not seem to work. However I left the virtual stuff in the config which was causing some confusion.

I have now added and hashed the virtual_mailbox_maps directive with my address's that are on the internal mail server to the virtual file. Seems to work now. Email is now being relayed.
added;
virtual_mailbox_maps = hash:/etc/postfix/virtual

I will give the example you recommend another shot, removing the the things I am not using --

thanks
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    SMS Forum Index » Installation Support All times are GMT + 2 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

SMS - Superb! Mini Server Project © 2016
Powered by phpBB © 2001, 2002 phpBB Group
iCGstation v1.0 Template By Ray © 2003, 2004 iOptional