Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > HOWTO-Related Questions

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 16th February 2009, 22:29
pebkac pebkac is offline
Senior Member
 
Join Date: Feb 2009
Posts: 133
Thanks: 2
Thanked 7 Times in 7 Posts
Default How to use a relay smtp server

Hey all, I installed "The perfect Ubuntu Server 8.10 as well as ISPconfig. Everything works and went well. My question is this, I do not have a static IP and don't plan on getting one. I use zoneedit for my name server as well as making sure the Internet knows where my domain is at all time, Seeing that I wanted to host my own www and mail. My problem is that some domains block me from sending mail to them because my IP is not on a good known list or something like that. I know it's because I have a dynamic ip. My solution now is to use my Mailrelay service with DynDns. My question is how can I make my server use them for outgoing mail? And will it use it for the webmail of ISPconfig?


--Steve
Reply With Quote
Sponsored Links
  #2  
Old 17th February 2009, 09:50
pebkac pebkac is offline
Senior Member
 
Join Date: Feb 2009
Posts: 133
Thanks: 2
Thanked 7 Times in 7 Posts
Cool found a way but still not working

Hey all, I found a way that should work, but now I get an error that says I;m not authenticating to my smtp relay server, perhaps another set of eyes will help me out. Here is my main postfix config file:

Code:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = mydomain.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
#mydestination = mydomain.com, localhost.mydomain.com, , localhost.localdomain,localhost
relayhost = outbound.mailhop.org:25
mynetworks = 127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtpd_sasl_local_domain = 
smtpd_sasl_auth_enable = yes
smtpd_sasl_password_maps=hash:/etc/postfix/sasl_passwd
smtpd_sasl_security_options= 
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
server = mydomain.com
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom

virtual_maps = hash:/etc/postfix/virtusertable

mydestination = /etc/postfix/local-host-names
I created a file at /etc/postfix/sasl_passwd
which has this in it:

Code:
 outbound.mailhop.org:25 userid:password
To me it seems it should all work now but when I send out an email through webmail (roundcubemail) I get this:

Code:
This is the mail system at host mydomain.com.

I'm sorry to have to inform you that your message could not
be delivered to one or more recipients. It's attached below.

For further assistance, please send mail to postmaster.

If you do so, please include this problem report. You can
delete your own text from the attached returned message.

                   The mail system

<user@gmail.com>: host outbound.mailhop.org[63.208.196.179] said:
    550 You must authenticate to use MailHop Outbound (in reply to MAIL FROM
    command)

Reporting-MTA: dns; mydomain.com
X-Postfix-Queue-ID: 88B68160514
X-Postfix-Sender: rfc822; user@mydomain.com
Arrival-Date: Mon, 16 Feb 2009 23:20:06 -0800 (PST)

Final-Recipient: rfc822; user@gmail.com
Action: failed
Status: 5.0.0
Remote-MTA: dns; outbound.mailhop.org
Diagnostic-Code: smtp; 550 You must authenticate to use MailHop Outbound

test
Any ideas?

Last edited by pebkac; 17th February 2009 at 09:54.
Reply With Quote
  #3  
Old 17th February 2009, 10:17
pebkac pebkac is offline
Senior Member
 
Join Date: Feb 2009
Posts: 133
Thanks: 2
Thanked 7 Times in 7 Posts
Default another update

I found this in the mail log....I guess this is why it's not working. Anyway to fix this?

Code:
server postfix/smtp[31603]: certificate  verification failed for outbound.mailhop.org[63.208.196.178]:25:untrusted issuer /C=US/O=Equifax/OU=Equifax Secure Certificate Authority
Reply With Quote
  #4  
Old 17th February 2009, 16:53
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,752 Times in 2,582 Posts
Default

Take a look here: http://www.howtoforge.com/postfix_re...her_mailserver
__________________
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 17th February 2009, 20:43
pebkac pebkac is offline
Senior Member
 
Join Date: Feb 2009
Posts: 133
Thanks: 2
Thanked 7 Times in 7 Posts
Default well...



I pretty much did all that before by following this guide.

https://www.dyndns.com/support/kb/ma...d.html#postfix



Now I did exactly what was that link you sent me and now I don't get a bounce back message, at least not now. But now this is in my mail log, repeating itself, so I assume it is the message I tried to send after applying the steps on the link you sent. Also since I've done this, I cannot access the Postfix module in Webmin all of the sudden???


Code:
Feb 17 10:37:04 pebkac-server postfix/postqueue[31223]: warning: close: Connection reset by peer
Feb 17 10:37:05 pebkac-server postfix/master[31345]: daemon started -- version 2.5.5, configuration /etc/postfix
Feb 17 10:37:05 pebkac-server postfix/qmgr[31349]: fatal: match_list_parse: open file /etc/postfix/local-host-namessmtp_sasl_auth_enable: No such file or directory
Feb 17 10:37:05 pebkac-server postfix/pickup[31348]: fatal: match_list_parse: open file /etc/postfix/local-host-namessmtp_sasl_auth_enable: No such file or directory
Feb 17 10:37:06 pebkac-server postfix/master[31345]: warning: process /usr/lib/postfix/qmgr pid 31349 exit status 1
Feb 17 10:37:06 pebkac-server postfix/master[31345]: warning: /usr/lib/postfix/qmgr: bad command startup -- throttling
Feb 17 10:37:06 pebkac-server postfix/master[31345]: warning: process /usr/lib/postfix/pickup pid 31348 exit status 1
Feb 17 10:37:06 pebkac-server postfix/master[31345]: warning: /usr/lib/postfix/pickup: bad command startup -- throttling
Feb 17 10:37:09 pebkac-server postfix/showq[31352]: fatal: match_list_parse: open file /etc/postfix/local-host-namessmtp_sasl_auth_enable: No such file or directory
Feb 17 10:37:10 pebkac-server postfix/master[31345]: warning: process /usr/lib/postfix/showq pid 31352 exit status 1
Feb 17 10:37:10 pebkac-server postfix/master[31345]: warning: /usr/lib/postfix/showq: bad command startup -- throttling
Also here is my current main.cf file

Code:
# See /usr/share/postfix/main.cf.dist for a commented, more complete version


# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = mydomian.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
#mydestination = server.mydomain.com, localhost.mydomian.com, , localhost.localdomain,localhost
relayhost = outbound.mailhop.org
mynetworks = 127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_password_maps=hash:/etc/postfix/sasl_passwd
smtpd_sasl_security_options=
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
server = server.mydomain.com
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom

virtual_maps = hash:/etc/postfix/virtusertable

mydestination = /etc/postfix/local-host-namessmtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options =

Last edited by pebkac; 17th February 2009 at 20:48. Reason: added info
Reply With Quote
  #6  
Old 17th February 2009, 22:45
pebkac pebkac is offline
Senior Member
 
Join Date: Feb 2009
Posts: 133
Thanks: 2
Thanked 7 Times in 7 Posts
 
Default thanks for your help

I figured it out. I restored my original main.cf, then did what your steps were in the link and bingo, it now works.

Thanks so much!

--Steve
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
Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail -Ubuntu 8.04 c4rdinal HOWTO-Related Questions 112 23rd August 2011 11:49
Undelivered Mail Returned to Sender Error202 General 5 7th May 2009 12:14
cacti problem - graphs have huge gaps Chip Installation/Configuration 7 8th February 2008 00:24
Webmail Relay Error palkat General 17 23rd April 2006 19:12
POP3 SMTP FTP problem arsu Installation/Configuration 1 11th November 2005 10:32


All times are GMT +2. The time now is 17:42.


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