Current time: 11-17-2024, 08:34 AM Hello There, Guest! (LoginRegister)


Post Reply 
How-to use external smtp server ?
Author Message
mikeb Offline


Posts: 1
Joined: Oct 2008
Reputation: 0
Post: #1
How-to use external smtp server ?
Hi all,
My ISP is blocking port 25 and I cannot use my own smtp server, it needs to be redirecting all outgoing emails towards my isp smtp server.

Thank you
(This post was last modified: 11-25-2008 03:01 AM by BeNe.)
10-30-2008 03:53 AM
Find all posts by this user Quote this message in a reply
joximu Offline
helper
*****
Moderators

Posts: 7,024
Joined: Jan 2007
Reputation: 92
Post: #2
RE: How-to use external smtp server
Have a look in the postfix documentation...

eg. http://www.postfix.org/BASIC_CONFIGURATI...#relayhost
10-30-2008 09:30 AM
Visit this user's website Find all posts by this user Quote this message in a reply
BeNe Offline
Moderator
*****
Moderators

Posts: 5,899
Joined: Jan 2007
Reputation: 68
Post: #3
RE: How-to use external smtp server
Or in the Wiki --> http://www.isp-control.net/documentation...mtp_server

Greez BeNe
10-31-2008 04:21 AM
Visit this user's website Find all posts by this user Quote this message in a reply
momo Offline
Junior Member
*

Posts: 148
Joined: Jun 2008
Reputation: 1
Post: #4
RE: How-to use external smtp server ?
This works for a home laptop I use for monitoring.
It sends db backup reports and nagios alerts.
I haven't test for virtual mail.

Code:
nano /etc/postfix/main.cf
myhostname = my-isp.tld
mydomain = $myhostname
myorigin  = $myhostname
mydestination = $myhostname
relayhost = smtp.my-isp.tld

/etc/init.d/postfix restart
09-05-2010 12:55 AM
Find all posts by this user Quote this message in a reply
puster Offline
Junior Member
*

Posts: 32
Joined: Oct 2008
Reputation: 0
Post: #5
RE: How-to use external smtp server ?
Hi everybody,

is there a chance that this can be done per domain, or is this a setting which
generally only applies to an entire server?
09-07-2010 11:51 PM
Find all posts by this user Quote this message in a reply
momo Offline
Junior Member
*

Posts: 148
Joined: Jun 2008
Reputation: 1
Post: #6
RE: How-to use external smtp server ?
I doubt.

http://www.postfix.org/postconf.5.html
Search for multiple SMTP
09-08-2010 12:10 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: #7
RE: How-to use external smtp server ?
Setting otugoing mail relays for specific domains *can* be done, but it involves a great deal of postfix's custom configuration, and I'm not sure about how well this will play with ispcp's settings.

Nevertheless, what you need to do is add a new directive "sender_dependent_relayhost_maps = /etc/postfix/sender_dependent_relay". Thereafter, create the referenced file and write there something like "@domain.tld smtp:[your.provider.smtp.host]" (brackets must be there). Postmap this file and restart postfix.

By doing this, postfix will use "your.provider.smtp.host" as an outgoing relay whenever mails come from "xxxx@domain.tld" users. Additionally, you will probably also have to add these directives to main.cf:
Code:
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd

And write the user/password combination to identify against your isp's smtp server in the "/etc/postfix/sasl_passwd" file (that must also be postmapped). It should contain something like:
Code:
[your.provider.smtp.host]    user:password

Restart postfix and it will identify as this user whenever relaying mails through your isp's smtp server.
09-09-2010 05:13 AM
Visit this user's website Find all posts by this user Quote this message in a reply
edinn Offline


Posts: 4
Joined: Sep 2010
Reputation: 0
Post: #8
RE: How-to use external smtp server ?
is it possible to make manual entry in postfix transport map, per domain, such as :
/etc/postfix/ispcp/transport:
domain.tld smtp:mx.google.com

(postmap that file and postfix reload after)

And ofc. to remove it from /etc/postfix/ispcp/domains

I tried that today, because mx entry was overwritten by dns template after subdomain addition, but gives me relay acc. denied.
09-15-2010 09:42 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: #9
RE: How-to use external smtp server ?
@edinn: what you're doing is completely different. Namely, you are choosing the next hop transport for a given destination domain. Contrastingly, in this thread we were discussing different outgoing relays based on source address (the sender domain).
09-15-2010 10:32 PM
Visit this user's website Find all posts by this user Quote this message in a reply
edinn Offline


Posts: 4
Joined: Sep 2010
Reputation: 0
Post: #10
RE: How-to use external smtp server ?
k, tnx, I'll start a new topic Smile
09-15-2010 11:27 PM
Find all posts by this user Quote this message in a reply
Post Reply 


Forum Jump:


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