Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 5th September 2006, 15:33
shiidii shiidii is offline
Member
 
Join Date: Jul 2006
Location: Melbourne, Australia
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Unhappy Cannot receive emails : DSN: User Unknown

Hi, I'm running an Ubuntu Dapper Drake server with ispconfig installed.

I have been trying to overcome this problem for quite a while and I feel that I'm nearly there.
I have setup email accounts on my server through ISPCONFIG and I can log into them with Outlook Express. However whenever I try to send an email to the account I get bounced back with unknown user
here is the mail log sent with www-data:

Code:
Sep  5 21:33:02 mailserver sm-mta[32024]: k85BX1Nr032023: to=<www-data@mailserver.mydomain.com>, delay=00:00:01, xdelay=00:00:00, mailer=local, pri=32639, dsn=2.0.0, stat=Sent
Sep  5 21:35:26 mailserver sendmail[32130]: k85BZQ74032130: from=www-data, size=260, class=0, nrcpts=1, msgid=<200609051135.k85BZQ74032130@mailserver.mydomain.com>, relay=www-data@localhost
Sep  5 21:35:26 mailserver sm-mta[32131]: k85BZQHP032131: <sales@mydomain.com>... User unknown
Sep  5 21:35:26 mailserver sendmail[32130]: k85BZQ74032130: to="Test - Sales@aaapaints User" <sales@mydomain.com>, ctladdr=www-data (33/33), delay=00:00:00, xdelay=00:00:00, mailer=relay, pri=30260, relay=[127.0.0.1] [127.0.0.1], dsn=5.1.1, stat=User unknown
Sep  5 21:35:26 mailserver sm-mta[32131]: k85BZQHP032131: from=<www-data@mailserver.mydomain.com>, size=260, class=0, nrcpts=0, proto=ESMTP, daemon=MSP-v4, relay=localhost [127.0.0.1]
Sep  5 21:35:26 mailserver sendmail[32130]: k85BZQ74032130: k85BZQ75032130: DSN: User unknown
This is the Postfix Main.cf in full

Code:
myhostname = mailserver.mydomain.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = mailserver.mydomain.com, localhost.example.com, localhost
relayhost =
mynetworks = 127.0.0.0/8
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
mailbox_command = procmail -a "$EXTENSION"
inet_protocols = all
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = no
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
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

# modify the existing smtpd_recipient_restrictions
smtpd_recipient_restrictions = reject_unauth_pipelining, permit_mynetworks, permit_sasl_authenticated, reject_non_fqdn_recipient, reject_unauth_destination, check_policy_service inet:127.0.0.1:60000, permit
# modify the existing smtpd_sender_restrictions
smtpd_sender_restrictions = permit_sasl_authenticated, permit_mynetworks, reject_non_fqdn_sender, reject_unknown_sender_domain, reject_unauth_pipelining, permit
# then add these
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_path = /etc/postfix/sasl:/usr/lib/sasl2
smtpd_sasl_security_options = noanonymous
smtpd_sasl_local_domain =

content_filter = amavis:[127.0.0.1]:10024
#receieve_override_options = no_address_mappings

virtual_maps = hash:/etc/postfix/virtusertable

mydestination =

# not sure of the difference of the next two
# but they are needed for local aliasing
alias_maps = hash:/etc/postfix/aliases
alias_database = hash:/etc/postfix/aliases
# this specifies where the virtual mailbox folders will be located
virtual_mailbox_base = /var/spool/mail/virtual
# this is for the mailbox location for each user
virtual_mailbox_maps = mysql:/etc/postfix/mysql_mailbox.cf
# and their user id
virtual_uid_maps = mysql:/etc/postfix/mysql_uid.cf
# and group id
virtual_gid_maps = mysql:/etc/postfix/mysql_gid.cf
# and this is for aliases
virtual_alias_maps = mysql:/etc/postfix/mysql_alias.cf
# and this is for domain lookups
virtual_mailbox_domains = mysql:/etc/postfix/mysql_domains.cf
# this is how to connect to the domains (all virtual, but the option is there)
# not used yet
# transport_maps = mysql:/etc/postfix/mysql_transport.cf

masquerade_domains = aaa-paints.mydomain.com !aaa-paints.mydomain.com
masquerade_exceptions = root

# Requirements for the HELO statement
smtpd_helo_restrictions = permit_mynetworks, warn_if_reject reject_non_fqdn_hostname, reject_invalid_hostname, permit
# Requirements for the sender details
smtpd_sender_restrictions = permit_mynetworks, warn_if_reject reject_non_fqdn_sender, reject_unknown_sender_domain, reject_unauth_pipelining, permit
# Requirements for the connecting server smtpd_client_restrictions = reject_rbl_client sbl.spamhaus.org, reject_rbl_client relays.ordb.org, reject_rbl_client blackholes.easynet.nl, reject_rbl_client dnsbl.njabl.org
# Requirement for the recipient address smtpd_recipient_restrictions = reject_unauth_pipelining, permit_mynetworks, reject_non_fqdn_recipient, reject_unknown_recipient_domain, reject_unauth_destination, permit

# require proper helo at connections
smtpd_helo_required = yes
# waste spammers time before rejecting them
smtpd_delay_reject = yes
disable_vrfy_command = yes
I'm sure there's something wrong in here.

Here is the ouput of "ls -la /root/ispconfig"

Code:
total 112
drwxr-xr-x  9 root root  4096 2006-09-05 21:20 .
drwxr-xr-x 11 root root  4096 2006-09-05 22:13 ..
-rwxr-xr-x  1 root root 45996 2006-07-06 12:26 cronolog
-rwxr-xr-x  1 root root  9673 2006-07-06 12:26 cronosplit
drwxr-xr-x 12 root root  4096 2006-07-06 12:09 httpd
drwxr-xr-x 12 root root  4096 2006-07-06 12:26 isp
-rw-r--r--  1 root root     9 2006-09-05 21:20 .old_path_httpd_root
drwxr-xr-x  6 root root  4096 2006-07-06 11:59 openssl
drwxr-xr-x  6 root root  4096 2006-07-18 01:56 php
drwxr-xr-x  4 root root  4096 2006-07-06 12:26 scripts
drwxr-xr-x  4 root root  4096 2006-07-06 12:26 standard_cgis
drwxr-xr-x  2 root root  4096 2006-07-06 12:26 sv
-rwx------  1 root root  9389 2006-07-06 12:26 uninstall
I do have a codomain for my website with an empty host, which often is the problem for a lot of people. Also my virtusertable and local-host-names files are configured correctly
Maildir is enabled in ISPCONFIG

Code:
###################################
#
# ISPConfig local-host-names Configuration File
#         Version 1.0
#
###################################
localhost
mailserver.mydomain.com
localhost.mailserver.mydomain.com
localhost.mydomain.com
www.mydomain.com
mydomain.com
#### MAKE MANUAL ENTRIES BELOW THIS LINE! ####
Code:
###################################
#
# ISPConfig virtusertable Configuration File
#         Version 1.0
#
###################################
sales@www.mydomain.com    web1_sales
web1_sales@www.mydomain.com    web1_sales
sales@mailserver.mydomain.com    web1_sales
web1_sales@mailserver.mydomain.com    web1_sales
sales@mydomain.com    web1_sales
web1_sales@mydomain.com    web1_sales
user@www.mydomain.com    web1_user
web1_user@www.mydomain.com    web1_user
user@mailserver.mydomain.com    web1_user
web1_user@mailserver.mydomain.com    web1_user
user@mydomain.com    web1_user
web1_user@mydomain.com    web1_user
user2@www.mydomain.com    web1_user2
web1_user2@www.mydomain.com    web1_user2
user2@mailserver.mydomain.com    web1_user2
web1_user2@mailserver.mydomain.com    web1_user2
user2@mydomain.com    web1_user2
web1_user2@mydomain.com    web1_user2
#### MAKE MANUAL ENTRIES BELOW THIS LINE! ####
I just can't seem to pin point where this is going wrong. The only problem is the incoming emails. I can log into the user accounts and send emails fine with outlook.
Thanks heaps for any help you have.

Last edited by shiidii; 7th January 2007 at 10:28.
Reply With Quote
Sponsored Links
  #2  
Old 5th September 2006, 18:05
torusturtle torusturtle is offline
Senior Member
 
Join Date: Apr 2006
Posts: 296
Thanks: 21
Thanked 24 Times in 16 Posts
Send a message via ICQ to torusturtle Send a message via AIM to torusturtle
Default

in /etc/postfix/main.cf

change
myhostname = mailserver.mydomain.com
to your real hostname

and

mydestination = mailserver.mydomain.com, localhost.example.com, localhost
to
mydestination = /etc/postfix/local-host-names
Reply With Quote
  #3  
Old 7th September 2006, 07:21
shiidii shiidii is offline
Member
 
Join Date: Jul 2006
Location: Melbourne, Australia
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks for replying . I made the changes, restarted postfix and tested, but I still get the same errors.

By the way mailserver.mydomain.com is the real server name, outgoing emails were being blocked if my server name wasn't the same name as what was on the MX Record.

It's puzzling because the mailboxes exist.. and I can login to them no problem.

Here is an error in the mail log that I'm getting that I assume isn't linked to the problem.. but might be

Code:
Sep  7 04:00:01 mailserver cleanup: clean up process starting: policyd v1.55
Sep  7 04:00:01 mailserver cleanup: connecting to mysql database: localhost
Sep  7 04:00:01 mailserver cleanup: mysql_real_connect(): Access denied for user 'postfix'@'localhost' (using password: YES)
Sep  7 04:00:01 mailserver cleanup: NOT connected..
Sep  7 04:00:01 mailserver cleanup: expiring validated records older than 30 days (1154973601)
Sep  7 04:00:01 mailserver cleanup: DEBUG: fd: 0 query=0, db_deletequery(): DELETE QUICK FROM triplet WHERE _datelast < 1154973601 LIMIT 100000
Sep  7 04:00:01 mailserver cleanup: db_deletequery()/mysql_query(): MySQL server has gone away -> DELETE QUICK FROM triplet WHERE _datelast < 1154973601 LIMIT 100000
Sep  7 13:16:08 mailserver courierpop3login: Connection, ip=[::ffff:203.51.183.135]
Sep  7 13:16:08 mailserver courierpop3login: LOGIN: DEBUG: ip=[::ffff:203.51.183.135], command=AUTH
Sep  7 13:16:08 mailserver courierpop3login: LOGIN: DEBUG: ip=[::ffff:203.51.183.135], command=CAPA
Sep  7 13:16:11 mailserver courierpop3login: LOGIN: DEBUG: ip=[::ffff:203.51.183.135], command=USER
Sep  7 13:16:11 mailserver courierpop3login: LOGIN: DEBUG: ip=[::ffff:203.51.183.135], command=PASS
Sep  7 13:16:11 mailserver courierpop3login: LOGIN: DEBUG: ip=[::ffff:203.51.183.135], username=web1_sales
Sep  7 13:16:11 mailserver courierpop3login: LOGIN: DEBUG: ip=[::ffff:203.51.183.135], password=*******
Sep  7 13:16:11 mailserver courierpop3login: authdaemon: starting client module
Sep  7 13:16:11 mailserver courierpop3login: authdaemon: ACCEPT, username web1_sales
Sep  7 13:16:11 mailserver courierpop3login: LOGIN, user=web1_sales, ip=[::ffff:203.51.183.135]
Sep  7 13:16:11 mailserver courierpop3login: LOGOUT, user=web1_sales, ip=[::ffff:203.51.183.135], top=0, retr=0, time=0
The server attempts to 'clean up' and connect to mysql, but can't get through. I'm using the right password and Postfix is a mysql user with all the priveleges.
As you can see, I can log into my accounts that I made with ispconfig

Is this possibly related to why I'm getting "User Unkown" ??
Reply With Quote
  #4  
Old 7th September 2006, 11:45
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 37,041
Thanks: 841
Thanked 5,660 Times in 4,467 Posts
Default

Did you follow one of the perfect setup guides?

Your postfix tries to connect to mysql, why? ISPConfig does not support postfix with mysql virtual users.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #5  
Old 8th September 2006, 02:16
shiidii shiidii is offline
Member
 
Join Date: Jul 2006
Location: Melbourne, Australia
Posts: 39
Thanks: 0
Thanked 0 Times in 0 Posts
Default

I did follow one of the perfect setups,

But I was stupid and thought that I needed to setup my mail server seperately to ispconfig. So I went through this:

http://flurdy.com/docs/postfix/index.html

It was a mistake, and I retraced, but obviously there's still some more things I need to Undo. Thanks for clarifying this, I shall keep trying to "Undo" what I've done.

Last edited by shiidii; 8th September 2006 at 02:55.
Reply With Quote
  #6  
Old 8th September 2006, 12:13
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 37,041
Thanks: 841
Thanked 5,660 Times in 4,467 Posts
Default

Please try to redo the postfix configuration steps from the perfect setup, this might be enough to reconfigure your postfix for ISPConfig.
__________________
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
Statistic not working mzo Installation/Configuration 49 20th April 2011 13:19
Howto suggestion suse PhP ver 4 + Ver 5 wwparrish Suggest HOWTO 11 7th August 2006 14:29
php script injections Grizzly General 21 18th July 2006 09:55
configuring IPTABLES firewall adityavpratap HOWTO-Related Questions 9 27th May 2006 22:42
Cannot receive emails skeeta Installation/Configuration 18 22nd April 2006 17:02


All times are GMT +2. The time now is 03:45.


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