LinuxQuestions.org
Register a domain and help support LQ
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices

Reply
 
Search this Thread
Old 05-23-2007, 04:27 AM   #1
btaylor1988
Member
 
Registered: Nov 2005
Location: England
Distribution: CentOS, Fedora
Posts: 79

Rep: Reputation: 15
postfix + mysql + dovecot (not reciving email)


Hi,

I wonder if anyone has any advice or knowledge on fixing this problem Iíve been having. i have just set up a postfix server that supports mysql and followed this online guide (well a few actually) and have also got dovecot working with all the necessary files. I can send emails and create and edit domain, mailbox and aliases etc from postfix admin, but the problem Iím having is that I canít seem to receive any email, the log donít seem to say anything and I have tried sending email from another server to it only for it to "status=deferred". The main guide I followed was:

http://www.linux-noob.com/forums/ind...showtopic=2490

If Iíve missed anything or if anyone has any ideas that would be great thanks!
 
Old 05-23-2007, 04:52 AM   #2
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
Post the output of postconf -n for a start
 
Old 05-23-2007, 04:53 AM   #3
btaylor1988
Member
 
Registered: Nov 2005
Location: England
Distribution: CentOS, Fedora
Posts: 79

Original Poster
Rep: Reputation: 15
it seems as now i have changed the:

inet_interfaces = localhost
#inet_interfaces = $myhostname
#inet_interfaces = $myhostname, localhost
inet_interfaces = all

section to all as well I can receive emails it tell me in the log and there placed in /vmail/somthing@somthing.com, yet when i go to http://localhost/webmail (which is Squirrel Mail) I can log in but see no emails that i have sent to myself, i have also tried emailing myself over localhost to test but with no luck.
 
Old 05-23-2007, 04:55 AM   #4
btaylor1988
Member
 
Registered: Nov 2005
Location: England
Distribution: CentOS, Fedora
Posts: 79

Original Poster
Rep: Reputation: 15
postconf -n:

[root@Goliath new]# postconf -n
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
debug_peer_level = 2
html_directory = no
inet_interfaces = all
mail_owner = postfix
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
mydestination = $myhostname, localhost.$mydomain
mydomain = mail.com
myhostname = mail.mail.com
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.1.5/README_FILES
sample_directory = /usr/share/doc/postfix-2.1.5/samples
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
unknown_local_recipient_reject_code = 550
virtual_alias_maps = mysql:/etc/postfix/mysql_virtual_alias_maps.cf
virtual_gid_maps = static:901
virtual_mailbox_base = /vmail
virtual_mailbox_domains = mysql:/etc/postfix/mysql_virtual_domains_maps.cf
virtual_mailbox_limit = 51200000
virtual_mailbox_maps = mysql:/etc/postfix/mysql_virtual_mailbox_maps.cf
virtual_minimum_uid = 901
virtual_transport = virtual
virtual_uid_maps = static:901



Hope that helps!

Last edited by btaylor1988; 05-23-2007 at 04:57 AM.
 
Old 05-23-2007, 05:23 AM   #5
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
So the postfix end is working OK?

are the mbox files in your mailbox directories? I assume you are using mbox anyway


What IMAP server are you running?
 
Old 05-23-2007, 05:30 AM   #6
btaylor1988
Member
 
Registered: Nov 2005
Location: England
Distribution: CentOS, Fedora
Posts: 79

Original Poster
Rep: Reputation: 15
yes it seems but i still cant find a way to recive emails if there getting to me or not. im using dovecot as my imap server. there are mbox files in mailbox directories yes.
 
Old 05-23-2007, 06:05 AM   #7
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
First, do the mbox files contain mail?

Second, if the above is true, can you see mail using any other mail client?

Third, did you configure squirrelmail (look for conf.pl)?

Fourth, did you configure dovecot (you may not need to, but it may not find your mboxs)
 
Old 05-23-2007, 08:45 AM   #8
btaylor1988
Member
 
Registered: Nov 2005
Location: England
Distribution: CentOS, Fedora
Posts: 79

Original Poster
Rep: Reputation: 15
First, do the mbox files contain mail?

yes, there are number and letter codes so i presume thats the mail. like:
1179855944.V301I362530.Server

Second, if the above is true, can you see mail using any other mail client?

ive not tried any other clients, do you know any i can test?

Third, did you configure squirrelmail (look for conf.pl)?

ive done nothing to squirrelmail in conf.pl or any other config. not sure what to edit.

Fourth, did you configure dovecot (you may not need to, but it may not find your mboxs)

i belive i configured dovecot to access mysql etc and made the extra files needed:

dovecot.conf:

auth_userdb = mysql /etc/dovecot-mysql.conf
auth_passdb = mysql /etc/dovecot-mysql.conf
first_valid_uid = 501
default_mail_env = maildir:/vmail/%u

dovecot-mysql.conf

db_host = 127.0.0.1
db_port = 3306
db = postfix
db_user = postfix
db_passwd = postfix
db_client_flags = 0
default_pass_scheme = PLAIN
password_query = SELECT password FROM mailbox WHERE username = '%u'
user_query = SELECT maildir, 901 AS uid, 901 AS gid FROM mailbox WHERE username = '%u'

along with the other files so i belive its finding the mailbox

Last edited by btaylor1988; 05-23-2007 at 08:47 AM.
 
Old 05-23-2007, 08:55 AM   #9
btaylor1988
Member
 
Registered: Nov 2005
Location: England
Distribution: CentOS, Fedora
Posts: 79

Original Poster
Rep: Reputation: 15
hmm now i have somthing weird going on:

i do dovecot -n and it tells me that there are no config files in /usr/local/etc/, yet ive placed them all in /etc/. dovecot will still start however and show up in the log as connecting to the database were mail is.
 
Old 05-23-2007, 05:24 PM   #10
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
You run conf.pl. I think you need to type

perl conf.pl from the relevant directoy. It's all menu driven and you should be able to find an option to set your imap server to dovecot

Do you have evolution or similar in gnome that you could set up as mail client?

You mau neet to edit the startup file for dovecot to point at /etc for configs
 
Old 05-26-2007, 03:51 AM   #11
btaylor1988
Member
 
Registered: Nov 2005
Location: England
Distribution: CentOS, Fedora
Posts: 79

Original Poster
Rep: Reputation: 15
Tried both yet still no joy, sorry for the late reply. Any ideas were the settings are for "edit the start-up file for dovecot to point at /etc for configs". Iíve tried using evolution on the local machine over vnc yet still no joy with that either.
 
Old 05-26-2007, 04:06 AM   #12
btaylor1988
Member
 
Registered: Nov 2005
Location: England
Distribution: CentOS, Fedora
Posts: 79

Original Poster
Rep: Reputation: 15
strange this is it seems to be reciving the email from my test email ntlworl.com in the logs:

May 26 10:03:10 Server postfix/smtpd[7164]: connect from mtaout03-winn.ispmail.ntl.com[81.103.221.49]
May 26 10:03:10 Server postfix/smtpd[7164]: BB79121B708: client=mtaout03-winn.ispmail.ntl.com[81.103.221.49]
May 26 10:03:10 Server postfix/cleanup[7170]: BB79121B708: message-id=<20070526090309.VVPH29112.aamtaout04-winn.ispmail.ntl.com@smtp.ntlworld.com>
May 26 10:03:10 Server postfix/qmgr[7138]: BB79121B708: from=<name@ntlworld.com>, size=1534, nrcpt=1 (queue active)
May 26 10:03:10 Server postfix/virtual[7175]: BB79121B708: to=<mail@mail.com>, relay=virtual, delay=0, status=sent (delivered to maildir)
May 26 10:03:10 Server postfix/qmgr[7138]: BB79121B708: removed
May 26 10:03:10 Server postfix/smtpd[7164]: disconnect from mtaout03-winn.ispmail.ntl.com[81.103.221.49]

any idears?
i was thinking along the lines of its actually sending the email but to the local folders not the mysql database or somthing along those lines.
 
Old 05-26-2007, 04:08 AM   #13
btaylor1988
Member
 
Registered: Nov 2005
Location: England
Distribution: CentOS, Fedora
Posts: 79

Original Poster
Rep: Reputation: 15
the file postfix/virtual is empty just as a note.
 
Old 05-26-2007, 04:17 AM   #14
billymayday
Guru
 
Registered: Mar 2006
Location: Sydney, Australia
Distribution: Fedora, CentOS, OpenSuse, Slack, Gentoo, Debian, Arch, PCBSD
Posts: 6,678

Rep: Reputation: 122Reputation: 122
How did you install dovecot?
 
Old 05-27-2007, 12:02 PM   #15
btaylor1988
Member
 
Registered: Nov 2005
Location: England
Distribution: CentOS, Fedora
Posts: 79

Original Poster
Rep: Reputation: 15
yum install dovecot
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Guide for postfix/dovecot/mysql authentication gnetcon Linux - Software 2 10-30-2006 08:11 AM
postfix dovecot mysql permissions issue gnetcon Linux - Software 4 08-03-2006 11:05 AM
Automated postfix and dovecot with mysql installation webserverdude General 0 06-26-2006 04:10 PM
Calculating email bandwidth with postfix / dovecot benr77 Linux - General 0 08-01-2005 06:13 PM
mysql, postfix, dovecot & spamassassin dadams Fedora 1 10-18-2004 08:40 PM


All times are GMT -5. The time now is 04:27 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration