Current time: 11-27-2024, 06:11 AM Hello There, Guest! (LoginRegister)


Post Reply 
Mail rely question
Author Message
robmorin Offline
Junior Member
*

Posts: 208
Joined: Apr 2007
Reputation: 0
Post: #1
Mail rely question
Hello all...

I have a 2 servers that are running Postfix version 2.3.8-2 on Debian Etch and accepts mail for a couple hundred domains, all works just fine now. One server is simply my MX, it just scans email and then delivers it to either my pop server for my virtual hosts or it relays the email to other clients that have their own pop server. My problem is, if that the clients i only scan mail to and then relay to, if they come onto my pop server(also my webserver where Omega resides) to use webmail the emails they send to their domain get delivered locally rather than go out to their own servers.... this of course would seem normal as i have entries like so...

As the control panel for these domains resides on the same server(pop & web) so any email originating on this server gets delivered locally....

In my main.cf i already have relayhost = [xx.xx.xx.154]

I figured all email would be redirected to that server, but it seems not if it is seen as local....

how can i have domain.com which is a relay only client relay to their own server
05-15-2008 03:48 AM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #2
RE: Mail rely question
Post your main.cf config please... With this info I would bet that you have the relayed domains in the virtual_domains table, so delete it from there, postmap, reload and tell us....
05-15-2008 03:56 AM
Visit this user's website Find all posts by this user Quote this message in a reply
robmorin Offline
Junior Member
*

Posts: 208
Joined: Apr 2007
Reputation: 0
Post: #3
RE: Mail rely question
Here is my main.cf

Not sure what you meant by the rest of your email if you can please give me more detail....

Thanks...

command_directory = /usr/sbin
daemon_directory = /usr/lib/postfix
program_directory = /usr/lib/postfix

#
# Some common configuration parameters;
#

inet_interfaces = all
mynetworks_style = host
mynetworks = xx.xx.xx.144/24, 127.0.0.1
myhostname = fred.domain.com
mydomain = fred.domain.com
myorigin = $mydomain
relayhost = [xx.xx.xx.154]
#smtpd_banner = $myhostname ISPCP 1.0 Priamos Managed ESMTP 1.0.0 RC2 OMEGA
smtpd_banner = $myhostname
setgid_group = postdrop

#
# Receiving messages parameters;
#
smtp_recipient_limit=20
smtpd_recipient_limit=20
default_destination_recipient_limit = 20
message_size_limit = 40720000


debug_peer_list = hotmail.com
debug_peer_level = 8

mydestination = $myhostname, $mydomain
append_dot_mydomain = no
append_at_myorigin = yes
local_transport = local
virtual_transport = virtual
transport_maps = hash:/etc/postfix/ispcp/transport

#
# Delivering local messages parameters;
#

mail_spool_directory = /var/mail

# Mailboxquota
# => 0 for unlimited
# => 104857600 for 100 MB
mailbox_size_limit = 0
mailbox_command = procmail -a "$EXTENSION"

biff = no

alias_database = hash:/etc/aliases

local_destination_recipient_limit = 1
local_recipient_maps = unix:passwd.byname $alias_database

#
# ISPCP Autoresponder parameters;
#

ispcp-arpl_destination_recipient_limit = 1

#
# Delivering virtual messages parameters;
#

virtual_mailbox_base = /var/mail/virtual
virtual_mailbox_limit = 0


virtual_mailbox_domains = hash:/etc/postfix/ispcp/domains
virtual_mailbox_maps = hash:/etc/postfix/ispcp/mailboxes

relay_recipient_maps = hash:/etc/postfix/relay_recipients
virtual_alias_maps = hash:/etc/postfix/ispcp/aliases
virtual_minimum_uid = 1001
virtual_uid_maps = static:1001
virtual_gid_maps = static:8

#
# SASL paramters;
#

smtpd_sasl_auth_enable = yes
smtpd_sasl2_auth_enable = yes
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain =
broken_sasl_auth_clients = yes
smtpd_sender_restrictions = permit_mynetworks,
permit_sasl_authenticated,
reject_unauth_destination

smtpd_recipient_restrictions = permit_mynetworks,
permit_sasl_authenticated,
reject_unauth_destination,
reject_unlisted_recipient
# check_policy_service inet:127.0.0.1:60000


#
# TLS parameters; activate, if avaible/used
#

#smtpd_tld_loglevel = 2
#smtpd_tls_cert_file = /etc/ssl/cert/mail-tls-cert.pem
#smtpd_tls_key_file = /etc/ssl/cert/mail-tls-key.pem
#smtpd_use_tls = yes
#smtpd_tls_auth_only = no
#smtpd_tls_received_header = yes


kilburn Wrote:Post your main.cf config please... With this info I would bet that you have the relayed domains in the virtual_domains table, so delete it from there, postmap, reload and tell us....
05-15-2008 04:32 AM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #4
RE: Mail rely question
Are the relayed domains in the file /etc/postfix/ispcp/domains? Remove them (and also in /etc/ispcp/postfix/working/domains, postmap the /etc/postfix/ispcp/domains file and reload postfix...
05-15-2008 07:02 PM
Visit this user's website Find all posts by this user Quote this message in a reply
robmorin Offline
Junior Member
*

Posts: 208
Joined: Apr 2007
Reputation: 0
Post: #5
RE: Mail rely question
Yes they are..... so i remove them and email will not be delivered locally, will it be refused or actually sent out to their own server?

Thanks.....


kilburn Wrote:Are the relayed domains in the file /etc/postfix/ispcp/domains? Remove them (and also in /etc/ispcp/postfix/working/domains, postmap the /etc/postfix/ispcp/domains file and reload postfix...
05-15-2008 10:15 PM
Find all posts by this user Quote this message in a reply
kilburn Offline
Development Team
*****
Dev Team

Posts: 2,182
Joined: Feb 2007
Reputation: 34
Post: #6
RE: Mail rely question
Your recipe:

1. Delete the domains from the /etc/ispcp/postfix/working/domains and /etc/postfix/ispcp/domains files
2. Add them to a new file named /etc/postfix/relay_domains
3. Execute: postconf relay_domains=hash:/etc/postfix/relay_domains
4. Execute: postmap /etc/postfix/relay_domains
5. Add the domains to the files /etc/ispcp/posftix/working/transport and /etc/postfix/ispcp/transport, following this scheme (where hostname or ip is the server where you want the mails delivered):
domain.tld :[hostname or ip]
6. Execute: postmap /etc/postfix/ispcp/transport
7. Check that the valid mail accounts exist in the /etc/postfix/relay_recipients file, add theme if they aren't
8. Execute: postmap /etc/postfix/relay_recipients
9. Execute: /etc/init.d/postfix reload

And test, ALL mails should be properly delivered to the destination that you've specified. From now on, the /etc/postfix/relay_recipients file should be manually modified (remember to postmap the file and reload the config in order to "activate" any change) whenever an account is added or deleted to the relayed domains.
(This post was last modified: 05-16-2008 12:01 AM by kilburn.)
05-15-2008 11:59 PM
Visit this user's website Find all posts by this user Quote this message in a reply
robmorin Offline
Junior Member
*

Posts: 208
Joined: Apr 2007
Reputation: 0
Post: #7
RE: Mail rely question
But if i add the domains to the transport file in ispcp, what would happen if someone uses an auto responder? is the transport file not used for domains that have auto responders enabled, thats what i thought and saw, so at some point in time a domain in that file might be listed twice , once for an autoresponder and once for a normal relay

Thanks...


kilburn Wrote:Your recipe:

1. Delete the domains from the /etc/ispcp/postfix/working/domains and /etc/postfix/ispcp/domains files
2. Add them to a new file named /etc/postfix/relay_domains
3. Execute: postconf relay_domains=hash:/etc/postfix/relay_domains
4. Execute: postmap /etc/postfix/relay_domains
5. Add the domains to the files /etc/ispcp/posftix/working/transport and /etc/postfix/ispcp/transport, following this scheme (where hostname or ip is the server where you want the mails delivered):
domain.tld :[hostname or ip]
6. Execute: postmap /etc/postfix/ispcp/transport
7. Check that the valid mail accounts exist in the /etc/postfix/relay_recipients file, add theme if they aren't
8. Execute: postmap /etc/postfix/relay_recipients
9. Execute: /etc/init.d/postfix reload

And test, ALL mails should be properly delivered to the destination that you've specified. From now on, the /etc/postfix/relay_recipients file should be manually modified (remember to postmap the file and reload the config in order to "activate" any change) whenever an account is added or deleted to the relayed domains.
05-23-2008 07:00 AM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 1 Guest(s)