Mail routing problem.

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

Mail routing problem.

Guy-749
Hi guys,

I've got a bit of a problem. I have two mail gateways that do
virtual_alias_maps lookups via mysql. So local mail gets passed back
to the imap servers, while any forwarding accounts go out from the
gateway to which ever remote email address the user has specified. My
problem is that one of the gateways has been blocked by Tiscali and
they are taking their own sweet time about replying to requests to
delist the gateway because some of our users forward mail to their
tiscali accounts.

Is it possible for me to route mail that is forwarding to
tiscali.co.uk via the second gateway (which isn't blacklisted by
Tiscali)?

This is my current postconf -n if it that helps.
root@aardvark:/var/log/mail# postconf -n
2bounce_notice_recipient = [hidden email]
anvil_rate_time_unit = 60s
bounce_notice_recipient = [hidden email]
bounce_template_file = /etc/postfix/bounce.cf
broken_sasl_auth_clients = yes
command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
cyrus_sasl_config_path = /etc/postfix/sasl/
daemon_directory = /usr/lib/postfix
debug_peer_level = 2
default_destination_concurrency_limit = 30
delay_notice_recipient = [hidden email]
error_notice_recipient = [hidden email]
home_mailbox = .maildir/
html_directory = /usr/share/doc/postfix-2.2.10/html
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
maps_rbl_domains = sbl-xbl.spamhaus.org
message_size_limit = 31240000
mynetworks = 127.0.0.0/8, 72.9.230.26
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
rbl_reply_maps = hash:/etc/postfix/rbl_reply
readme_directory = /usr/share/doc/postfix-2.2.10/readme
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtpd_client_connection_count_limit = 30
smtpd_client_connection_rate_limit = 30
smtpd_client_message_rate_limit = 100
smtpd_client_recipient_rate_limit = 50
smtpd_error_sleep_time = 1s
smtpd_hard_error_limit = 20
smtpd_recipient_restrictions = permit_mynetworks,
permit_sasl_authenticated,      reject_invalid_hostname,
reject_non_fqdn_sender, reject_unknown_sender_domain,
reject_unauth_destination,      check_client_access
cidr:/etc/postfix/postfix-dnswl-permit,       reject_rbl_client
zen.spamhaus.org,     reject_rbl_client bl.spamcop.net,
reject_rbl_client psbl.surriel.com,     reject_rhsbl_client
zen.spamhaus.org,     reject_rhsbl_client bl.spamcop.net,
check_policy_service inet:127.0.0.1:10031,      permit
smtpd_sasl_auth_enable = yes
smtpd_sasl_authenticated_header = yes
smtpd_sasl_local_domain =
smtpd_sasl_path = smtpd
smtpd_sasl_security_options = noanonymous
smtpd_soft_error_limit = 10
smtpd_tls_CAfile = /etc/ssl/certs/ca-bundle.crt
smtpd_tls_cert_file = /etc/ssl/certs/imapd.pem
smtpd_tls_key_file = /etc/ssl/private/imapd.pem
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
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
mysql:/etc/postfix/mysql_virtual_catchall_maps.cf
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_transport = smtp:barracuda.domain.org

Thanks
Guy

PS. I've got the Book of Postfix on order, but I need help with this
now and can't really wait.

--
Don't just do something...sit there!
Reply | Threaded
Open this post in threaded view
|

Re: Mail routing problem.

Guy-749
[UPDATE]

Been looking at transport tables. Is the following solution workable
as a temporary measure?

On the unblacklisted gateway I add the blacklisted gateway to the
mynetworks line in main.cf.

On the blacklisted gateway I do the following:
Add the line below to main.cf
transport_maps = hash:/etc/postfix/transport

/etc/postfix/transport contains:
mylocaldomain1     smtp:localserver.mydomain.org
mylocaldomain2     smtp:localserver.mydomain.org
tiscali.co.uk           smtp:othergateway.mydomain.org
*                           :MX's of other domains

I'm not sure if the last line in the hash file is possible or what the
syntax would be. Can something like that be done? Local domains get
delivered locally, tiscali.co.uk gets delivered to the other gateway
to be sent along to tiscali's MXs and any other nonlocal domain
(hotmail, gmail etc) gets sent to the MXs for that domain.

Thanks for any help anyone can offer.
Guy

2008/11/27 Guy <[hidden email]>:

> Hi guys,
>
> I've got a bit of a problem. I have two mail gateways that do
> virtual_alias_maps lookups via mysql. So local mail gets passed back
> to the imap servers, while any forwarding accounts go out from the
> gateway to which ever remote email address the user has specified. My
> problem is that one of the gateways has been blocked by Tiscali and
> they are taking their own sweet time about replying to requests to
> delist the gateway because some of our users forward mail to their
> tiscali accounts.
>
> Is it possible for me to route mail that is forwarding to
> tiscali.co.uk via the second gateway (which isn't blacklisted by
> Tiscali)?
>

--
Don't just do something...sit there!
Reply | Threaded
Open this post in threaded view
|

Re: Mail routing problem.

Sahil Tandon
In reply to this post by Guy-749
Guy <[hidden email]> wrote:

> I've got a bit of a problem. I have two mail gateways that do
> virtual_alias_maps lookups via mysql. So local mail gets passed back
> to the imap servers, while any forwarding accounts go out from the
> gateway to which ever remote email address the user has specified. My
> problem is that one of the gateways has been blocked by Tiscali and
> they are taking their own sweet time about replying to requests to
> delist the gateway because some of our users forward mail to their
> tiscali accounts.
>
> Is it possible for me to route mail that is forwarding to
> tiscali.co.uk via the second gateway (which isn't blacklisted by
> Tiscali)?

Yes, with transport maps.  Example:

main.cf:
transport_maps = hash:/etc/postfix/transport

/etc/postfix/transport:
tiscali.co.uk smtp:[your.other.gateway]

And ensure that the second gateway accepts and relays mail on behalf of
the first (blacklisted) gateway.

--
Sahil Tandon <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Mail routing problem.

Sahil Tandon
In reply to this post by Guy-749
Guy <[hidden email]> wrote:

> /etc/postfix/transport contains:
> mylocaldomain1     smtp:localserver.mydomain.org
> mylocaldomain2     smtp:localserver.mydomain.org
> tiscali.co.uk           smtp:othergateway.mydomain.org
> *                           :MX's of other domains

You needn't place anything but tiscali.co.uk in your transport file.
Mail addressed to the other (local and non-local) domains should arrive
at the appropriate nexthop by default.  You are only trying to override
the default nexthop for tiscali.co.uk.

--
Sahil Tandon <[hidden email]>
Reply | Threaded
Open this post in threaded view
|

Re: Mail routing problem.

Guy-749
Worked like a charm. Thanks a bunch for the help Sahil.

2008/11/27 Sahil Tandon <[hidden email]>:
> You needn't place anything but tiscali.co.uk in your transport file.
> Mail addressed to the other (local and non-local) domains should arrive
> at the appropriate nexthop by default.  You are only trying to override
> the default nexthop for tiscali.co.uk.
>
> --
> Sahil Tandon <[hidden email]>
>



--
Don't just do something...sit there!