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 3rd June 2010, 02:44
gtblackwell gtblackwell is offline
Junior Member
 
Join Date: Jun 2010
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default Perfect Server: Ubuntu 10.04: postfix/squirrelmail issues

I've never run a mailserver before, but I went through the Perfect Server tut without any installation issues. Website is up and running and postfix is able to send messages to outside addresses (i.e., my personal gmail account) but messages sent to administrator@mydomain.com get rejected:

Quote:
Delivery to the following recipient failed permanently:

administrator@mydomain.com

Technical details of permanent failure:
Google tried to deliver your message, but it was rejected by the recipient domain. We recommend contacting the other email provider for further information about the cause of this error. The error that the other server returned was: 550 550 #5.1.0 Address rejected administrator@mydomain.com (state 14).

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

MIME-Version: 1.0
Received: by 10.216.90.3 with SMTP id d3mr552196wef.110.1275523670515; Wed, 02
Jun 2010 17:07:50 -0700 (PDT)
Received: by 10.216.176.193 with HTTP; Wed, 2 Jun 2010 17:07:50 -0700 (PDT)
Date: Wed, 2 Jun 2010 19:07:50 -0500
Message-ID: <AANLkTil7gViYEirDNa8n1S0GJ2q4Ghkpl5ApbZL5Z7W_@mai l.gmail.com>
Subject: testing
From: Geoff Blackwell <geoff.blackwell@gmail.com>
To: administrator@mydomain.com
Content-Type: multipart/alternative; boundary=0016e6d7e8ff489eaf048814ffff

testing
This doesn't seem to have affected the logs at all (the test email was sent at 19:07:50):

mail.log:
Quote:
Jun 2 19:05:01 www imapd: Connection, ip=[::1]
Jun 2 19:05:01 www imapd: Disconnected, ip=[::1], time=0
Jun 2 19:05:01 www pop3d: Connection, ip=[::1]
Jun 2 19:05:01 www pop3d: Disconnected, ip=[::1]
Jun 2 19:05:01 www postfix/smtpd[21095]: connect from localhost.locldomain[127.0.0.1]
Jun 2 19:05:01 www postfix/smtpd[21095]: lost connection after CONNECT from localhost.locldomain[127.0.0.1]
Jun 2 19:05:01 www postfix/smtpd[21095]: disconnect from localhost.locldomain[127.0.0.1]
Jun 2 19:10:01 www imapd: Connection, ip=[::1]
Jun 2 19:10:01 www imapd: Disconnected, ip=[::1], time=0
Jun 2 19:10:01 www pop3d: Connection, ip=[::1]
Jun 2 19:10:01 www pop3d: Disconnected, ip=[::1]
Jun 2 19:10:01 www postfix/smtpd[21192]: connect from localhost.locldomain[127.0.0.1]
Jun 2 19:10:01 www postfix/smtpd[21192]: lost connection after CONNECT from localhost.locldomain[127.0.0.1]
Jun 2 19:10:01 www postfix/smtpd[21192]: disconnect from localhost.locldomain[127.0.0.1]
(I've noticed that I misspelled "locldomain" in /etc/hosts, but fixing that has had no effect on the problem.)

here's /etc/postfix/main.cf:
Quote:
# 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 = /usr/share/doc/postfix

# TLS parameters
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/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 = www.radicalrationalist.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = www.radicalrationalist.com, localhost, localhost.localdomain
relayhost =
mynetworks = 127.0.0.0/8 [::1]/128
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
html_directory = /usr/share/doc/postfix/html
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /var/vmail
virtual_uid_maps = static:5000
virtual_gid_maps = static:5000
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, check_recipient_access mysql:/etc/postfix/mysql-virtual_recipient.cf, reject_unauth_destination
smtpd_tls_security_level = may
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
relay_recipient_maps = mysql:/etc/postfix/mysql-virtual_relayrecipientmaps.cf
virtual_create_maildirsize = yes
virtual_maildir_extended = yes
virtual_mailbox_limit_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailbox_limit_maps.cf
virtual_mailbox_limit_override = yes
virtual_maildir_limit_message = "The user you are trying to reach is over quota."
virtual_overquota_bounce = yes
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains $relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks $virtual_mailbox_limit_maps
smtpd_sender_restrictions = check_sender_access mysql:/etc/postfix/mysql-virtual_sender.cf
smtpd_client_restrictions = check_client_access mysql:/etc/postfix/mysql-virtual_client.cf
maildrop_destination_concurrency_limit = 1
maildrop_destination_recipient_limit = 1
virtual_transport = maildrop
header_checks = regexp:/etc/postfix/header_checks
mime_header_checks = regexp:/etc/postfix/mime_header_checks
nested_header_checks = regexp:/etc/postfix/nested_header_checks
body_checks = regexp:/etc/postfix/body_checks
content_filter = amavis:[127.0.0.1]:10024
receive_override_options = no_address_mappings
In addition, squirrelmail fails every login attempt, saying "Unknown user or password incorrect." Here's a relevant portion of mail.log:

Quote:
Jun 2 19:35:01 www imapd: Connection, ip=[::1]
Jun 2 19:35:01 www imapd: Disconnected, ip=[::1], time=0
Jun 2 19:35:01 www pop3d: Connection, ip=[::1]
Jun 2 19:35:01 www pop3d: Disconnected, ip=[::1]
Jun 2 19:35:01 www postfix/smtpd[21788]: connect from localhost.localdomain[127.0.0.1]
Jun 2 19:35:01 www postfix/smtpd[21788]: lost connection after CONNECT from localhost.localdomain[127.0.0.1]
Jun 2 19:35:01 www postfix/smtpd[21788]: disconnect from localhost.localdomain[127.0.0.1]
I have my router forwarding port 25 to the server and my ip address is static. I've added nothing to the server beyond what the tut went over (save for the website in /var/www but that shouldn't matter).

I've searched the web and have found various other people having problems logging in to squirrelmail, but there are so many different permutations and none of them match the issue I'm having, which makes me hesitant to attempt their workarounds for fear of screwing things up more.

Any suggestions?
Reply With Quote
Sponsored Links
  #2  
Old 3rd June 2010, 15:45
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,721 Times in 2,562 Posts
Default

Does the MX record for mydomain.com point to the correct server? You can check that by running
Code:
dig mx mydomain.com
Did you use the ISPConfig 2 or ISPConfig 3 Perfect Server guide?
__________________
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 3rd June 2010, 20:45
gtblackwell gtblackwell is offline
Junior Member
 
Join Date: Jun 2010
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I used the ISPConfig 3 tutorial. here is the output from dig:
Quote:
; <<>> DiG 9.7.0-P1 <<>> mx mydomain.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 13122
;; flags: qr rd ra; QUERY: 1, ANSWER: 2, AUTHORITY: 2, ADDITIONAL: 2

;; QUESTION SECTION:
;mydomain.com. IN MX

;; ANSWER SECTION:
mydomain.com. 1374 IN MX 0 smtp.secureserver.net.
mydomain.com. 1374 IN MX 10 mailstore1.secureserver.net.

;; AUTHORITY SECTION:
mydomain.com. 1374 IN NS ns36.domaincontrol.com.
mydomain.com. 1374 IN NS ns35.domaincontrol.com.

;; ADDITIONAL SECTION:
smtp.secureserver.net. 127 IN A 72.167.238.201
mailstore1.secureserver.net. 46 IN A 72.167.238.201

;; Query time: 35 msec
;; SERVER: 74.84.119.150#53(74.84.119.150)
;; WHEN: Thu Jun 3 13:34:49 2010
;; MSG SIZE rcvd: 188
I gather that smpt.secureserver.net and mailstore1.secureserver.net should point to mydomain.com?
Reply With Quote
  #4  
Old 4th June 2010, 05:42
gtblackwell gtblackwell is offline
Junior Member
 
Join Date: Jun 2010
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

After allowing the change to take effect, email is still being rejected. Here are the new results of dig:
Quote:
; <<>> DiG 9.7.0-P1 <<>> mx www.mydomain.com
;; global options: +cmd
;; Got answer:
;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 44369
;; flags: qr rd ra; QUERY: 1, ANSWER: 3, AUTHORITY: 2, ADDITIONAL: 2

;; QUESTION SECTION:
;www.mydomain.com. IN MX

;; ANSWER SECTION:
www.mydomain.com. 3577 IN CNAME mydomain.com.
mydomain.com. 3600 IN MX 0 www.mydomain.com.
mydomain.com. 3600 IN MX 10 www.mydomain.com.

;; AUTHORITY SECTION:
mydomain.com. 3577 IN NS ns36.domaincontrol.com.
mydomain.com. 3577 IN NS ns35.domaincontrol.com.

;; ADDITIONAL SECTION:
ns35.domaincontrol.com. 2001 IN A 216.69.185.18
ns36.domaincontrol.com. 2296 IN A 208.109.255.18

;; Query time: 139 msec
;; SERVER: 74.84.119.150#53(74.84.119.150)
;; WHEN: Thu Jun 3 22:32:19 2010
;; MSG SIZE rcvd: 174
I assume it should be set to www.mydomain.com since I don't have a computer labeled smtp or mailstore1, as opposed to the old target servers.

(I'm assuming this is meant to help the server accept incoming mails and will have no effect on whether or not I can log into squirrelmail. Is that correct?)
Reply With Quote
  #5  
Old 4th June 2010, 12:30
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,721 Times in 2,562 Posts
Default

You should have an MX record for mydomain.com, not www.mydomain.com, unless you have email addresses of the form @www.mydomain.com.

Also, MX records must always point to A records; CNAME records are not allowed. So you could create an A record mail.mydomain.com that points to your server's IP, and then you create an MX record for mydomain.com which points to mail.mydomain.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
  #6  
Old 8th June 2010, 15:51
gtblackwell gtblackwell is offline
Junior Member
 
Join Date: Jun 2010
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

After correcting some fairly boneheaded settings in main.cf, the system can now send and receive mail, which I can access locally through mutt. Squirrellmail still refuses to recognize administrator as a user, as does Thunderbird. Not even sure what settings/logs/config files to present to help in solving this problem.
Reply With Quote
  #7  
Old 9th June 2010, 14:43
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,721 Times in 2,562 Posts
Default

Take a look at /var/log/mail.log.
__________________
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
  #8  
Old 9th June 2010, 15:45
gtblackwell gtblackwell is offline
Junior Member
 
Join Date: Jun 2010
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
Default

mail.log isn't telling me much. Only that the login failed:

Quote:
$ tail /var/log/mail.log
Jun 9 08:35:01 www pop3d: Disconnected, ip=[::1]
Jun 9 08:35:01 www postfix/smtpd[2031]: connect from localhost.localdomain[127.0.0.1]
Jun 9 08:35:01 www postfix/smtpd[2031]: lost connection after CONNECT from localhost.localdomain[127.0.0.1]
Jun 9 08:35:01 www postfix/smtpd[2031]: disconnect from localhost.localdomain[127.0.0.1]
Jun 9 08:36:55 www imapd: Connection, ip=[::1]
Jun 9 08:36:55 www imapd: LOGIN FAILED, user=administrator@mydomain.com, ip=[::1]
Jun 9 08:37:00 www imapd: LOGOUT, ip=[::1], rcvd=77, sent=332
Jun 9 08:37:30 www imapd: Connection, ip=[::1]
Jun 9 08:37:30 www imapd: LOGIN FAILED, user=administrator, ip=[::1]
Jun 9 08:37:35 www imapd: LOGOUT, ip=[::1], rcvd=54, sent=332
(Not sure why the ip is being reported as ::1.)

This hasn't told me anything that I didn't already know. The login simply fails, whether I use a simple username or a full email address.
Reply With Quote
  #9  
Old 10th June 2010, 14:45
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,721 Times in 2,562 Posts
Default

Did you send an email to administrator@mydomain.com before you tried to log in (to make sure Maildir for that account exists)?
__________________
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
  #10  
Old 10th June 2010, 15:26
gtblackwell gtblackwell is offline
Junior Member
 
Join Date: Jun 2010
Posts: 6
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Yes. And mutt is able to read them and they're visible in ~/Mail/new
Reply With Quote
Reply

Bookmarks

Tags
mail server, postfix, squirrelmail, webmail

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
Ubuntu Server, postfix, gmail relay sjau Server Operation 3 14th December 2010 18:20
Perfect Server Ubuntu 8.10 vs. 8.04 LTS atjensen11 HOWTO-Related Questions 1 13th April 2009 11:07
Howtoforge the perfect Server(links) rini90 Installation/Configuration 0 14th December 2008 10:58
The Perfect Setup - Ubuntu 6.10 Server Question n74jw HOWTO-Related Questions 5 27th January 2008 12:14
The Perfect Setup Suse 9.3 - Postfix problems new_bee05 HOWTO-Related Questions 20 25th November 2005 02:30


All times are GMT +2. The time now is 16:13.


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