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 6th December 2007, 12:20
Merrigan Merrigan is offline
Junior Member
 
Join Date: Jun 2006
Location: Pretoria
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
Question Virtual Users And Domains With Postfix, Courier And MySQL (Ubuntu 7.10)

HI All,

I have been following this HOWTO for the better part of my day.

Everything went perfectly according to the howto, except that it could not log into the MySQL server. I changed it all - and it seems to be working more than just a little bit perfectly now.

The Problem is the following:

I am unable to send mail to any local user on the machine itself - Thunderbird reports no errors, but my mail log spits out the following:

Code:
Dec  6 12:30:51 ubuntuer postfix/smtpd[4894]: connect from unknown[192.168.0.15]
Dec  6 12:30:51 ubuntuer postfix/smtpd[4894]: DA2A21F36A9: client=unknown[192.168.0.15], sasl_method=PLAIN, sasl_username=merrigan@lewendewoord.co.za
Dec  6 12:30:51 ubuntuer postfix/cleanup[4898]: DA2A21F36A9: message-id=<4757CFBE.5030005@lewendewoord.co.za>
Dec  6 12:30:51 ubuntuer postfix/qmgr[4657]: DA2A21F36A9: from=<merrigan@lewendewoord.co.za>, size=544, nrcpt=2 (queue active)
Dec  6 12:30:52 ubuntuer postfix/smtpd[4894]: disconnect from unknown[192.168.0.15]
Dec  6 12:30:52 ubuntuer postfix/smtpd[4901]: connect from localhost[127.0.0.1]
Dec  6 12:30:52 ubuntuer postfix/smtpd[4901]: 1179F1F36AA: client=localhost[127.0.0.1]
Dec  6 12:30:52 ubuntuer postfix/cleanup[4898]: 1179F1F36AA: message-id=<4757CFBE.5030005@lewendewoord.co.za>
Dec  6 12:30:52 ubuntuer postfix/qmgr[4657]: 1179F1F36AA: from=<merrigan@lewendewoord.co.za>, size=896, nrcpt=2 (queue active)
Dec  6 12:30:52 ubuntuer postfix/trivial-rewrite[4914]: warning: do not list domain lewendewoord.co.za in BOTH mydestination and virtual_mailbox_domains
Dec  6 12:30:52 ubuntuer postfix/trivial-rewrite[4914]: warning: do not list domain lewendewoord.co.za in BOTH mydestination and virtual_mailbox_domains
Dec  6 12:30:52 ubuntuer postfix/local[4917]: warning: dict_nis_init: NIS domain name not set - NIS lookups disabled
Dec  6 12:30:52 ubuntuer postfix/smtpd[4901]: disconnect from localhost[127.0.0.1]
Dec  6 12:30:52 ubuntuer amavis[4021]: (04021-05) Passed CLEAN, LOCAL [192.168.0.15] [192.168.0.15] <merrigan@lewendewoord.co.za> -> <merrigan@lewendewoord.co.za>,<wimmel@lewendewoord.co.za>, Message-ID: <4757CFBE.5030005@lewendewoord.co.za>, mail_id: DbZm8+wFUp4E, Hits: -, queued_as: 1179F1F36AA, 205 ms
Dec  6 12:30:52 ubuntuer postfix/smtp[4899]: DA2A21F36A9: to=<merrigan@lewendewoord.co.za>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.29, delays=0.08/0/0.01/0.21, dsn=2.6.0, status=sent (250 2.6.0 Ok, id=04021-05, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 1179F1F36AA)
Dec  6 12:30:52 ubuntuer postfix/smtp[4899]: DA2A21F36A9: to=<wimmel@lewendewoord.co.za>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.29, delays=0.08/0/0.01/0.21, dsn=2.6.0, status=sent (250 2.6.0 Ok, id=04021-05, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as 1179F1F36AA)
Dec  6 12:30:52 ubuntuer postfix/qmgr[4657]: DA2A21F36A9: removed
Dec  6 12:30:52 ubuntuer postfix/local[4902]: 1179F1F36AA: to=<merrigan@lewendewoord.co.za>, relay=local, delay=0.12, delays=0.04/0/0/0.07, dsn=5.1.1, status=bounced (unknown user: "merrigan")
Dec  6 12:30:53 ubuntuer postfix/local[4917]: 1179F1F36AA: to=<wimmel@lewendewoord.co.za>, relay=local, delay=1.3, delays=0.04/0.02/0/1.2, dsn=5.1.1, status=bounced (unknown user: "wimmel")
Dec  6 12:30:53 ubuntuer postfix/cleanup[4898]: 558771F36A9: message-id=<20071206103053.558771F36A9@lewendewoord.co.za>
Dec  6 12:30:53 ubuntuer postfix/qmgr[4657]: 558771F36A9: from=<>, size=2953, nrcpt=1 (queue active)
Dec  6 12:30:53 ubuntuer postfix/trivial-rewrite[4914]: warning: do not list domain lewendewoord.co.za in BOTH mydestination and virtual_mailbox_domains
Dec  6 12:30:53 ubuntuer postfix/bounce[4903]: 1179F1F36AA: sender non-delivery notification: 558771F36A9
Dec  6 12:30:53 ubuntuer postfix/qmgr[4657]: 1179F1F36AA: removed
Dec  6 12:30:53 ubuntuer postfix/local[4902]: 558771F36A9: to=<merrigan@lewendewoord.co.za>, relay=local, delay=0.04, delays=0.02/0/0/0.02, dsn=5.1.1, status=bounced (unknown user: "merrigan")
Dec  6 12:30:53 ubuntuer postfix/qmgr[4657]: 558771F36A9: removed
This server is only for testing the HOWTO, and is luckily not the production one.

Also - I am unable to send any mail to any user outside of the domain, which is weird as well - since I set the transport table with the following:

Code:
+--------------------+------------------------------+
| domain             | transport                    |
+--------------------+------------------------------+
| lewendewoord.co.za | :                            | 
| *                  | smtp:mail.lewendewoord.co.za | 
+--------------------+------------------------------+
Any help would be much appreciated?

Thanx a LOT!
__________________
-- M
The Silent Observer
Reply With Quote
Sponsored Links
  #2  
Old 6th December 2007, 14:01
Tashio Tashio is offline
Junior Member
 
Join Date: Dec 2007
Location: Pretoria
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
Default

Hey Merrigan

Dec 6 12:30:52 ubuntuer postfix/trivial-rewrite[4914]: warning: do not list domain lewendewoord.co.za in BOTH mydestination and virtual_mailbox_domains

This line is one of the culprits, I have had the same problem for last day or two just fixed it now.

in /etc/postfix/main.cf you probably have

mydestination = lewendewoord.co.za, localhost, localhost.localdomain

change this to
mydestination = SERVERNAME , localhost, localhost.localdomain

so if your server is called myserver then insert myserver where SERVERNAME is.

Tashio
Reply With Quote
The Following User Says Thank You to Tashio For This Useful Post:
Merrigan (6th December 2007)
  #3  
Old 6th December 2007, 14:16
Merrigan Merrigan is offline
Junior Member
 
Join Date: Jun 2006
Location: Pretoria
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Hey,

Thanks a lot tashio, It has fixed the internal issue - now to get the mail sent externally :P
__________________
-- M
The Silent Observer

Last edited by Merrigan; 6th December 2007 at 14:27.
Reply With Quote
  #4  
Old 6th December 2007, 14:23
Tashio Tashio is offline
Junior Member
 
Join Date: Dec 2007
Location: Pretoria
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
Default

Yea I'm still getting relay access denied errors when trying to send email to external addresses but my current main problem is I can't logon to the pop3 server, for some reason getting access denied on the authdaemond. I've checked all the files that contain user/password information for connecting to the sql server but it's still throwing it out.

authdaemond: failed to connect to mysql server (server=localhost, userid=mail_admin): Access denied for user 'mail_admin'@'localhost' (using password: YES)
Reply With Quote
  #5  
Old 6th December 2007, 14:31
Merrigan Merrigan is offline
Junior Member
 
Join Date: Jun 2006
Location: Pretoria
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Tashio
Yea I'm still getting relay access denied errors when trying to send email to external addresses but my current main problem is I can't logon to the pop3 server, for some reason getting access denied on the authdaemond. I've checked all the files that contain user/password information for connecting to the sql server but it's still throwing it out.

authdaemond: failed to connect to mysql server (server=localhost, userid=mail_admin): Access denied for user 'mail_admin'@'localhost' (using password: YES)
Mine did that as well - and I suspect it is a user setup issue - try using your root username and PW - i did that and Mine is now working. I'll try and figure out the REAL issue - I just wanted to check where the problem was
__________________
-- M
The Silent Observer
Reply With Quote
  #6  
Old 6th December 2007, 15:01
Tashio Tashio is offline
Junior Member
 
Join Date: Dec 2007
Location: Pretoria
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
Default

Found the login problem, you need to go back and check all the /etc/postfix/mysql_virtual.*.cf files make sure that there is NO space after the username and password, IE the cursor stops at the last letter of the user/pass, for some reason vi puts a space as soon as you finish a word and escape out, so odds are there is a space after user or password
also need to check

/etc/pam.d/smtp
and the primary culprit

/etc/courier/authmysqlrc

Now to get external mail going out.

EDIT: External Working, you need to set your mail client to authenticate for SMTP

Last edited by Tashio; 6th December 2007 at 15:08.
Reply With Quote
  #7  
Old 7th December 2007, 07:10
Merrigan Merrigan is offline
Junior Member
 
Join Date: Jun 2006
Location: Pretoria
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Quote:
Originally Posted by Tashio
Found the login problem, you need to go back and check all the /etc/postfix/mysql_virtual.*.cf files make sure that there is NO space after the username and password, IE the cursor stops at the last letter of the user/pass, for some reason vi puts a space as soon as you finish a word and escape out, so odds are there is a space after user or password
also need to check

/etc/pam.d/smtp
and the primary culprit

/etc/courier/authmysqlrc

Now to get external mail going out.

EDIT: External Working, you need to set your mail client to authenticate for SMTP
I Did that, but it's not working. I can send mail to any of the mailboxes I created on the machine, but not outside the machine to for instance my GMail account...
__________________
-- M
The Silent Observer
Reply With Quote
  #8  
Old 7th December 2007, 09:05
Merrigan Merrigan is offline
Junior Member
 
Join Date: Jun 2006
Location: Pretoria
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
Default

Ok...

I got the mail sending outward much better so far, sometimes it's successful - sometimes not - but I think It's a remote smtp server issue.

I was wondering whether anyone knows how to setup fetchmail to deliver mail into a virtual user inbox. I used the normal one that delivers into the home directories and it didn't work - how does one setup it to deliver into the virtual box?

Thanx all!!!
__________________
-- M
The Silent Observer
Reply With Quote
  #9  
Old 7th December 2007, 09:13
Tashio Tashio is offline
Junior Member
 
Join Date: Dec 2007
Location: Pretoria
Posts: 4
Thanks: 0
Thanked 1 Time in 1 Post
Default

What is the error message you'r getting when you try send external?
Reply With Quote
  #10  
Old 7th December 2007, 09:20
Merrigan Merrigan is offline
Junior Member
 
Join Date: Jun 2006
Location: Pretoria
Posts: 6
Thanks: 1
Thanked 0 Times in 0 Posts
 
Default

Well To me it seems to have been A DNS Server issue. I put the mail server's IP in the transport into [square brackets] and all is well now, sending like mad.

Does anyone know how to make fetchmail or anything else for that matter, drop mail into the virtual mailbox?

Thanx all!
__________________
-- M
The Silent Observer
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 And MySQL Secondary MX acoghlan HOWTO-Related Questions 1 8th March 2008 05:02
Virtual Users And Domains With Postfix, Courier And MySQL (Ubuntu 6.10 Edgy Eft) dongthao HOWTO-Related Questions 1 11th September 2007 17:41
Virtual Users And Domains With Postfix, Courier And MySQL [+ procmail ?] immobilia HOWTO-Related Questions 5 29th June 2006 23:20
Virtual Users And Domains With Postfix, Courier And MySQL - "apt-get" and Courier burritonator HOWTO-Related Questions 3 15th March 2006 20:11
Problem with Virtual Users And Domains With Postfix, Courier And MySQL Howto fenix Server Operation 4 11th March 2006 02:53


All times are GMT +2. The time now is 01:12.


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