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.
Closed Thread
 
Thread Tools Display Modes
  #1  
Old 20th December 2009, 19:12
flying_horse flying_horse is offline
Junior Member
 
Join Date: Dec 2009
Posts: 4
Thanks: 1
Thanked 1 Time in 1 Post
Default Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 9.10)

Hi there,

i'm still trying to get the system to work, but it still failed.

If i sent an email from e.g. root to sales:

mailx sales

i get this inside the logs: status=bounced (unknown user: "sales")

MAIL.LOG
--------
Dec 20 17:42:07 horse amavis[1054]: (01054-03) Passed CLEAN, <root@smtp.horse.dyndns.org> -> <sales@smtp.horse.dyndns.org>, Message-ID: <20091220164205.6281E25496@smtp.horse.dyndns.org >, mail_id: dLpP7Cllx1MA, Hits: 1.545, size: 336, queued_as: 0432C24F5E, 1611 ms
Dec 20 17:42:07 horse postfix/smtp[2067]: 6281E25496: to=<sales@smtp.horse.dyndns.org>, relay=127.0.0.1[127.0.0.1]:10024, delay=1.8, delays=0.11/0.01/0.01/1.6, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=01054-03, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 0432C24F5E)
Dec 20 17:42:07 horse postfix/qmgr[1682]: 6281E25496: removed
Dec 20 17:42:07 horse postfix/local[2071]: 0432C24F5E: to=<sales@smtp.horse.dyndns.org>, relay=local, delay=0.11, delays=0.04/0.03/0/0.04, dsn=5.1.1, status=bounced (unknown user: "sales")

telnet smtp.horse.dyndns.org 25
Works fine.

If i sent an mail to a local user:

mailx flying

all mails for the local user went into /var/spool/mail/

Do i need to configure something for them in mysql ?
What do i need to do if i add new users in mysql mail user table ?
Do i need to change the aliases file ?

Thanks for your help
Flying Horse
Sponsored Links
  #2  
Old 21st December 2009, 14:38
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

You must use the full email address, not just the left part of the address:
mailx sales@example.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:
The Following User Says Thank You to falko For This Useful Post:
flying_horse (22nd December 2009)
  #3  
Old 22nd December 2009, 13:11
flying_horse flying_horse is offline
Junior Member
 
Join Date: Dec 2009
Posts: 4
Thanks: 1
Thanked 1 Time in 1 Post
Default

Thanks falko for your post,but i still got the same error.

I redid the whole procedure and reinstalled everything and it looks ok right now.

But i still have some question about the local users and the users inside MYSQL.

1.) Do i need to create for each local user an entry inside MYSQL so that they receive mails as well ?

2.) would it be possible to get the BIND9 configuration for your TUTORIAL, because i guess that the mail.example.com will be defined in BIND, so an example config would be nice.Is it maybe required to configure BIND for mail for this scenario ?

3.) How can i add an other domain, like i've got

a) domain1.dyndns.org
b) domain2.dyndns.org

I've added these two domains into

mydestination = domain2.dyndns.org, localhost.domain2.dyndns.org, SERVERNAME.domain1.dyndns.org, localhost.domain1.dyndns.org, localhost, localhost.localdomain'

and into domains tbl. The users tbl contain

a) sales@domain1.dyndns.org
b) sales@domain2.dyndns.org

The transport table is empty,but i get the following error if i sent an email to sales@domain2.dyndns.org:

a) warning: do not list domain domain1.dyndns.org in BOTH mydestination and virtual_mailbox_domains
b) status=bounced (unknown user: "sales")

If i sent an email to sales@domain1.dyndns.org it is successful.

If i add into transport tbl --> domain: domain2.dyndns.org transport: smtp:SERVERNAME.domain1.dyndns.org i get this error:

a) status=bounced (mail for SERVERNAME.domain1.dyndns.org loops back to myself)

Thanks a lot for all answers, btw i do not use QUOTA and not ISPconfig.

I wish everyone some nice christmas days and good start into 2010

Flying Horse

Last edited by flying_horse; 23rd December 2009 at 00:23.
  #4  
Old 23rd December 2009, 13:56
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,747 Times in 2,578 Posts
Default

Quote:
Originally Posted by flying_horse View Post
1.) Do i need to create for each local user an entry inside MYSQL so that they receive mails as well ?
No, don't add local users and their domains to the MySQL database. The database must contain only virtual users and only the domains that the virtual users use. The domains that are used by local users must be in mydestination, not in the database.

Quote:
Originally Posted by flying_horse View Post
2.) would it be possible to get the BIND9 configuration for your TUTORIAL, because i guess that the mail.example.com will be defined in BIND, so an example config would be nice.Is it maybe required to configure BIND for mail for this scenario ?
You must configure the DNS records on the authoritative DNS servers for your domain (most likely they are run by your domain registrar). You can find them out by running
Code:
dig ns yourdomain.com
Quote:
Originally Posted by flying_horse View Post
3.) How can i add an other domain, like i've got

a) domain1.dyndns.org
b) domain2.dyndns.org

I've added these two domains into

mydestination = domain2.dyndns.org, localhost.domain2.dyndns.org, SERVERNAME.domain1.dyndns.org, localhost.domain1.dyndns.org, localhost, localhost.localdomain'

and into domains tbl. The users tbl contain

a) sales@domain1.dyndns.org
b) sales@domain2.dyndns.org
If you use domain1.dyndns.org and domain2.dyndns.org for virtual users, then you must remove them from mydestination. They must be in the database.
__________________
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:
  #5  
Old 23rd December 2009, 17:11
flying_horse flying_horse is offline
Junior Member
 
Join Date: Dec 2009
Posts: 4
Thanks: 1
Thanked 1 Time in 1 Post
Default

Thanks for your answers.

There is still one problem left, if i want to access the mail via SQUIRRELMAIL. I'm only able to get into SM for the virtual users.

Any idea ?

Thanks
  #6  
Old 24th December 2009, 19:09
flying_horse flying_horse is offline
Junior Member
 
Join Date: Dec 2009
Posts: 4
Thanks: 1
Thanked 1 Time in 1 Post
 
Thumbs up

Found the solution:

Need to change in /etc/courier/authdaemonrc the following line:
Code:
...
authmodulelist="authpam authmysql"
...
You need to add into vi /etc/postfix/main.cf
Code:
...
home_mailbox = Maildir/
...
Thread can be closed
The Following User Says Thank You to flying_horse For This Useful Post:
falko (25th December 2009)
Closed Thread

Bookmarks

Tags
bounced, postfix, unknown user

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 9.10) keyslapper HOWTO-Related Questions 4 20th April 2010 16:46
Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 9.10) deadkenny HOWTO-Related Questions 1 17th December 2009 08:46
Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 9.10) marmellata HOWTO-Related Questions 2 13th December 2009 18:52
Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 9.04) Master One HOWTO-Related Questions 4 1st July 2009 16:38
Virtual Users And Domains With Postfix, Courier, MySQL And SquirrelMail (Ubuntu 8.10) VTCop HOWTO-Related Questions 9 9th April 2009 17:17


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


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