Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 2nd January 2008, 05:33
heymrdj heymrdj is offline
Member
 
Join Date: Feb 2007
Posts: 58
Thanks: 2
Thanked 4 Times in 4 Posts
Default Full Email support in ISPConfig server

Looking to get the mail server part working in my setups. The server's host name is serverhost (it is a main server for many virtual ones) on the domain eatest.homelinux.org. The entire access to the server is http://serverhost.eatest.homelinux.org Bellsouth DSL blocks port 25, so I know this is the place to start. My domain uses DynDNS to use auto IP update for my dynamic IP. The server is in DMZ by my router, and I've successfully outsourced MySQL, web, and FTP to my brother in Wisconsin. (I'm in Georgia, so i know that's a good distance DNS test.) Now how do I get email to work right where the server can both send and receive email (such as to user heymrdj on serverhost.eatest.homelinux.org). Is fixing this port problem the only issue? What about MX records, I know I don't have any? I don't think anyways. Please enlighten me. thank you
Reply With Quote
Sponsored Links
  #2  
Old 3rd January 2008, 14:33
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

You can use the ports 465 or 587 if 25 is blocked. If you search the forum ,you should find some threads about this. Then you should relay your emails through another mail server because most dynamic IP addresses are blacklisted nowadays: http://www.howtoforge.com/postfix_re...her_mailserver

To check your MX records, run
Code:
dig mx yourdomain.com
To find out about the authoritative nameservers for your domain, run
Code:
dig ns yourdomain.com
__________________
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
  #3  
Old 5th January 2008, 19:27
heymrdj heymrdj is offline
Member
 
Join Date: Feb 2007
Posts: 58
Thanks: 2
Thanked 4 Times in 4 Posts
Default

Well i'm still kind of out of it. I am trying to route email from ISPConfig server to my SMTP server on my linux box. I ran the port change with somting like
Code:
465 initd - - - - smptd
or somehting similar...got it off another post on this forum. Then I ran your guide on relays using my everythinganime.org server. I ended up tring to send email and got this:
Code:
Sat Jan 5 12:46:49 	web1_proxy@example.com 	heymrdjCW@gmail.com 	764 bytes 	connect to linuxsrv01.usdcservers.net[208.78.40.25]: Connection timed out
The first thing I don't undestand is that example.com, this is through ISPConfig squirrelmail logged in as root@serverhost.eatest.homelinux.org and yet it's showing that example.com in the message ques in Webmin.

When i dig my MX I get:
Code:
; <<>> DiG 9.2.4 <<>> -t MX www.eatest.homelinux.org
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 21142
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 5, ADDITIONAL: 5

;; QUESTION SECTION:
;www.eatest.homelinux.org. IN MX

;; ANSWER SECTION:
www.eatest.homelinux.org. 60 IN CNAME eatest.homelinux.org.
eatest.homelinux.org. 60 IN MX 10 linuxsrv01.usdcservers.net.

;; AUTHORITY SECTION:
homelinux.org. 39801 IN NS ns5.dyndns.org.
homelinux.org. 39801 IN NS ns3.dyndns.org.
homelinux.org. 39801 IN NS ns2.dyndns.org.
homelinux.org. 39801 IN NS ns4.dyndns.org.
homelinux.org. 39801 IN NS ns1.dyndns.org.

;; ADDITIONAL SECTION:
ns1.dyndns.org. 62898 IN A 63.208.196.90
ns3.dyndns.org. 84281 IN A 208.78.69.75
ns4.dyndns.org. 4010 IN A 91.198.22.75
ns2.dyndns.org. 23419 IN A 204.13.249.75
ns5.dyndns.org. 51062 IN A 203.62.195.75

;; Query time: 114 msec
;; SERVER: 70.84.160.11#53(70.84.160.11)
;; WHEN: Sat Jan 5 11:17:50 2008
;; MSG SIZE rcvd: 275

When I dig my NS I get
Code:
; <<>> DiG 9.2.4 <<>> -t NS www.serverhost.eatest.homelinux.org
;; global options: printcmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 25046
;; flags: qr rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 1, ADDITIONAL: 0

;; QUESTION SECTION:
;www.serverhost.eatest.homelinux.org. IN NS

;; ANSWER SECTION:
www.serverhost.eatest.homelinux.org. 48 IN CNAME eatest.homelinux.org.

;; AUTHORITY SECTION:
homelinux.org. 1800 IN SOA ns1.dyndns.org. hostmaster.dyndns.org. 2049969684 10800 1800 604800 1800

;; Query time: 27 msec
;; SERVER: 70.84.160.11#53(70.84.160.11)
;; WHEN: Sat Jan 5 11:18:59 2008
;; MSG SIZE rcvd: 125
In ISPConfig, do i need to make my primary and secondary nameservers ns1/ns2.dyndns.org instead of the serverhost.eatest.homelinux.org they are now?
Reply With Quote
  #4  
Old 6th January 2008, 13:36
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,741 Times in 2,575 Posts
Default

An MX record must never point to a CNAME record - it must point to an A record instead.

Quote:
Originally Posted by heymrdj
In ISPConfig, do i need to make my primary and secondary nameservers ns1/ns2.dyndns.org instead of the serverhost.eatest.homelinux.org they are now?
You don't need ISPConfig's DNS Manager at all because the records for homelinux.org are managed by the company that owns homelinux.org.
__________________
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 13th January 2008, 22:31
heymrdj heymrdj is offline
Member
 
Join Date: Feb 2007
Posts: 58
Thanks: 2
Thanked 4 Times in 4 Posts
Default

I found out how you can use GMAIL SMTP server as a relay host in Postfix.

Code:
relayhost = [smtp.gmail.com]:587

#auth
smtp_sasl_auth_enable=yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd

#tls
smtp_use_tls = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = noanonymous
smtp_tks_note_starttls_offer = yes
tls_random_source = dev:/dev/urandom
smtp_tls_scert_verifydepth = 5
smtp_tls_key_file=/etc/postfix/certs/itchy.key
smtp_tls_cert_file=/etc/postfix/certs/itchy.pem
smtpd_tls_ask_ccert = yes
smtpd_tls_req_ccert =no
smtp_tls_enforce_peername = no

Create “/etc/postfix/sasl_passwd” with the following format:
gmail-smtp.l.google.com user@gmail.com:password
smtp.gmail.com user@gmail.com:password

postmap /etc/posfix/sasl_passwd

/etc/init.d/postfix reload
I just have one question. When relaying like this, do the receivers of the email see my servers email (egw[REMOVE]eatest.homelinux.org) or do they see the account i relay through (heymrdjCW[REMOVE]@gmail.com) on the from line. I want the server to send emails in the form of the first, rather than the latter.
Reply With Quote
  #6  
Old 14th January 2008, 09:29
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,046
Thanks: 826
Thanked 5,388 Times in 4,233 Posts
Default

The receivers should see the email address that you used in your mail client. But you should simply test it as it is possible that google rewrites the email address.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #7  
Old 14th January 2008, 12:27
heymrdj heymrdj is offline
Member
 
Join Date: Feb 2007
Posts: 58
Thanks: 2
Thanked 4 Times in 4 Posts
Default

I found out Google does indeed rewrite, but with a simple change in settings in the gmail account you can have it not rewrite accounts. Thanks alot . I'm ready to start some more tests for my home EGroupWare install in ISPConfig .
Reply With Quote
  #8  
Old 29th January 2008, 23:30
heymrdj heymrdj is offline
Member
 
Join Date: Feb 2007
Posts: 58
Thanks: 2
Thanked 4 Times in 4 Posts
Default

I've made a lot of progress and eventually got it where i could receive mail, but couldn't send. After following a gmail guide, I got it so i could send it, but now i can't remember how i got it to receive mail

This is what I get when i send an email from my gmail or Bellsouth address from Outlook or the gmail interface to one of my servers emails, heymrdj@weavers.homelinux.org:

Code:
This is an automatically generated Delivery Status Notification

Delivery to the following recipient failed permanently:

     heymrdj@weavers.homelinux.org

Technical details of permanent failure: 
PERM_FAILURE: SMTP Error (state 12): 530 5.7.0 Must issue a STARTTLS command first

   ----- Original message -----

Received: by 10.100.33.19 with SMTP id g19mr15853285ang.117.1201644385525;
        Tue, 29 Jan 2008 14:06:25 -0800 (PST)
Return-Path: <*blanked out my email here*>
Received: from Heymrdjlaptop ( [70.144.224.161])
        by mx.google.com with ESMTPS id 3sm6457699hsw.12.2008.01.29.14.06.24
        (version=TLSv1/SSLv3 cipher=OTHER);
        Tue, 29 Jan 2008 14:06:24 -0800 (PST)
To: <heymrdj@weavers.homelinux.org>
Subject: test
Date: Tue, 29 Jan 2008 17:06:09 -0500
Message-ID: <002d01c862c3$28161620$78424260$@com>
MIME-Version: 1.0
Content-Type: multipart/alternative;
	boundary="----=_NextPart_000_002E_01C86299.3F400E20"
X-Mailer: Microsoft Office Outlook 12.0
thread-index: Achiwycx1ZqEuG3/QwScNF5LU7O1OQ==
Content-Language: en-us
From: Casey Weaver <Blanked out my email here>

This is a multipart message in MIME format.

------=_NextPart_000_002E_01C86299.3F400E20
Content-Type: text/plain;
	charset="us-ascii"
Content-Transfer-Encoding: 7bit

Bounce test

 

   ----- Message truncated -----
/etc/postfix/main.cf
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 (Debian/GNU)
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

# 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:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
smtp_use_tls = yes
smtp_sasl_security_options = 
smtp_sasl_tls_security_options = noanonymous
smtp_tls_note_starttls_offer = yes
smtp_tls_scert_verifydepth = 5
smtp_tls_key_file=/etc/postfix/ssl/smtpd.key
smtp_tls_cert_file=/etc/postfix/ssl/smtpd.crt
smtpd_tls_ask_ccert = yes
smtpd_tls_req_ccert =no
smtp_tls_enforce_peername = no
#auth
smtp_sasl_auth_enable=yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd

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

myhostname = weavers.homelinux.org
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = weavers.homelinux.org, localhost.weavers.homelinux.org, localhost.localdomain, localhost
relayhost = [smtp.gmail.com]:587
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_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtpd_tls_auth_only = no
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
/etc/postfix/master.cf
Code:
#
# Postfix master process configuration file.  For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# ==========================================================================
# service type  private unpriv  chroot  wakeup  maxproc command + args
#               (yes)   (yes)   (yes)   (never) (100)
# ==========================================================================
smtp      inet  n       -       -       -       -       smtpd
#submission inet n       -       -       -       -       smtpd
  -o smtpd_enforce_tls=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
smtps     inet  n       -       -       -       -       smtpd
#  -o smtpd_tls_wrappermode=yes
#  -o smtpd_sasl_auth_enable=yes
#  -o smtpd_client_restrictions=permit_sasl_authenticated,reject
#628      inet  n       -       -       -       -       qmqpd
pickup    fifo  n       -       -       60      1       pickup
cleanup   unix  n       -       -       -       0       cleanup
qmgr      fifo  n       -       n       300     1       qmgr
#qmgr     fifo  n       -       -       300     1       oqmgr
tlsmgr    unix  -       -       -       1000?   1       tlsmgr
rewrite   unix  -       -       -       -       -       trivial-rewrite
bounce    unix  -       -       -       -       0       bounce
defer     unix  -       -       -       -       0       bounce
trace     unix  -       -       -       -       0       bounce
verify    unix  -       -       -       -       1       verify
flush     unix  n       -       -       1000?   0       flush
proxymap  unix  -       -       n       -       -       proxymap
smtp      unix  -       -       -       -       -       smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay     unix  -       -       -       -       -       smtp
	-o fallback_relay=
#       -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq     unix  n       -       -       -       -       showq
error     unix  -       -       -       -       -       error
discard   unix  -       -       -       -       -       discard
local     unix  -       n       n       -       -       local
virtual   unix  -       n       n       -       -       virtual
lmtp      unix  -       -       -       -       -       lmtp
anvil     unix  -       -       -       -       1       anvil
scache	  unix	-	-	-	-	1	scache
#
# ====================================================================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent.  See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ====================================================================
#
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
#
maildrop  unix  -       n       n       -       -       pipe
  flags=DRhu user=vmail argv=/usr/bin/maildrop -d ${recipient}
#
# See the Postfix UUCP_README file for configuration details.
#
uucp      unix  -       n       n       -       -       pipe
  flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# Other external delivery methods.
#
ifmail    unix  -       n       n       -       -       pipe
  flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp     unix  -       n       n       -       -       pipe
  flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix	-	n	n	-	2	pipe
  flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman   unix  -       n       n       -       -       pipe
  flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
  ${nexthop} ${user}
/etc/postfix/sasl_passwd (has been postamapped to /etc/postfix/sasl_passwd.db) Where Usernameass is are my actual gmail credentials.

Code:
gmail-smtp.l.google.com username:pass
smtp.gmail.com username:pass
I'm doing my best to combine the Perfect Debian Etch server guide, the Postfix for Relaying emails guide, and this Gmail Postfix relay guide. Any help on what's causing the STARTTLS error?

Last edited by heymrdj; 29th January 2008 at 23:32.
Reply With Quote
  #9  
Old 30th January 2008, 02:00
heymrdj heymrdj is offline
Member
 
Join Date: Feb 2007
Posts: 58
Thanks: 2
Thanked 4 Times in 4 Posts
Default

And one other question, what do you tell programs your smtp server is when they want it send email? mail.yourdomain.com? Then a username and password of an account in that domain you own? (such as the logins to heymrdj@weavers.homelinux.org)?
Reply With Quote
  #10  
Old 30th January 2008, 08:30
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 36,046
Thanks: 826
Thanked 5,388 Times in 4,233 Posts
 
Default

Is this a server with ISPConfig installed? Your main.cf does not look like you have ISPConfig installed. Did you follow exactly the perfect setzp guide to install your server?

Quote:
And one other question, what do you tell programs your smtp server is when they want it send email? mail.yourdomain.com? Then a username and password of an account in that domain you own? (such as the logins to heymrdj@weavers.homelinux.org)?
You may use any domain that points to your server as smtp and pop3 server in the mail client.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
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
Cannot send email from OE through ISPconfig site tomd General 10 12th March 2009 06:05
ISPConfig 2.3.2-dev released till General 9 4th June 2007 10:46
Support Tickets - Email End User Xtreem1986 Installation/Configuration 8 11th May 2007 01:47
Another ERROR: The PHP binary coming with ISPConfig does not work properly on your sy hoopsx3 Installation/Configuration 2 29th January 2007 07:56
SP-Server Setup - Ubuntu 5.10 "Breezy Badger" - Page 6 (changes) LuisC-SM HOWTO-Related Questions 0 21st April 2006 15:16


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


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