View previous topic :: View next topic |
Author |
Message |
CanuckNJE n00b

Joined: 17 Nov 2003 Posts: 24
|
Posted: Tue Mar 02, 2004 4:56 am Post subject: Simple (I think) Postfix configuration question |
|
|
OK, so I have postfix running, and I want to set it so send mail via my ISP's SMTP server. In main.cf I put the line:
Code: | relayhost = smtp.charter.net |
Then I restarted the postfix service. But if I try to send an email by using:
Code: | mutt -f imap://localhost |
Then enter the address, subject and the word "test" in the email, then nothing is recieved at the email account listed as the destination. I have courier-imapd running. What am I doing wrong here? |
|
Back to top |
|
 |
Slurp53 Apprentice


Joined: 14 Jun 2002 Posts: 255 Location: Iowa
|
Posted: Tue Mar 02, 2004 3:32 pm Post subject: |
|
|
I am unsure what is wrong here, but did you check the log files? Postfix logs every little step that the email takes. Maybe that would give you a clue.
 _________________ "Welcome to the Pleasuredome" -- Frankie Goes to Hollywood |
|
Back to top |
|
 |
Sequentious Apprentice

Joined: 07 Jun 2002 Posts: 290 Location: London Ontario Canada
|
Posted: Tue Mar 02, 2004 5:09 pm Post subject: |
|
|
Correct me if I'm wrong, but relay host sets what hosts your mailserver is allowed to relay FOR, not where to relay to _________________ --
Chris I
chris@cidesign.ca :: www.cidesign.ca/~chris/ |
|
Back to top |
|
 |
kashani Advocate


Joined: 02 Sep 2002 Posts: 2032 Location: San Francisco
|
Posted: Tue Mar 02, 2004 6:26 pm Post subject: |
|
|
relay_domains is the setting for domains you'd want to relay for, relay_host is the machine(s) you want Postfix to use, so that's all correct.
I'd verify that Postfix is running and then post a snippet of the logs when you attempt to send an email.
kashani _________________ Will personally fix your server in exchange for motorcycle related shop tools in good shape. |
|
Back to top |
|
 |
CanuckNJE n00b

Joined: 17 Nov 2003 Posts: 24
|
Posted: Tue Mar 02, 2004 11:12 pm Post subject: |
|
|
Which log do you want to see? I have a mail.err, mail.log, and mail.info in /var/log which contains the following (this is just the end of the files, I've left out the rest because it repeats itself):
mail.err:
Code: |
...
Mar 3 01:58:20 gentoo postfix/local[29749]: fatal: open database /etc/mail/aliases.db: No such file or directory
Mar 3 01:59:21 gentoo postfix/local[29750]: fatal: open database /etc/mail/aliases.db: No such file or directory
Mar 3 02:00:22 gentoo postfix/local[29764]: fatal: open database /etc/mail/aliases.db: No such file or directory
Mar 3 02:01:23 gentoo postfix/local[29765]: fatal: open database /etc/mail/aliases.db: No such file or directory
Mar 3 02:02:24 gentoo postfix/local[29773]: fatal: open database /etc/mail/aliases.db: No such file or directory
Mar 3 02:03:25 gentoo postfix/local[29774]: fatal: open database /etc/mail/aliases.db: No such file or directory
Mar 3 02:04:26 gentoo postfix/local[29796]: fatal: open database /etc/mail/aliases.db: No such file or directory
Mar 3 02:05:27 gentoo postfix/local[29800]: fatal: open database /etc/mail/aliases.db: No such file or directory
Mar 3 02:06:28 gentoo postfix/local[29803]: fatal: open database /etc/mail/aliases.db: No such file or directory
|
mail.info:
Code: |
...
Mar 3 02:04:26 gentoo postfix/local[29796]: fatal: open database /etc/mail/aliases.db: No such file or directory
Mar 3 02:04:27 gentoo postfix/master[27659]: warning: process /usr/lib/postfix/local pid 29796 exit status 1
Mar 3 02:04:27 gentoo postfix/master[27659]: warning: /usr/lib/postfix/local: bad command startup -- throttling
Mar 3 02:05:27 gentoo postfix/local[29800]: fatal: open database /etc/mail/aliases.db: No such file or directory
Mar 3 02:05:28 gentoo postfix/master[27659]: warning: process /usr/lib/postfix/local pid 29800 exit status 1
Mar 3 02:05:28 gentoo postfix/master[27659]: warning: /usr/lib/postfix/local: bad command startup -- throttling
Mar 3 02:06:28 gentoo postfix/local[29803]: fatal: open database /etc/mail/aliases.db: No such file or directory
Mar 3 02:06:29 gentoo postfix/master[27659]: warning: process /usr/lib/postfix/local pid 29803 exit status 1
Mar 3 02:06:29 gentoo postfix/master[27659]: warning: /usr/lib/postfix/local: bad command startup -- throttling
Mar 3 02:07:29 gentoo postfix/local[29805]: fatal: open database /etc/mail/aliases.db: No such file or directory
Mar 3 02:07:30 gentoo postfix/master[27659]: warning: process /usr/lib/postfix/local pid 29805 exit status 1
Mar 3 02:07:30 gentoo postfix/master[27659]: warning: /usr/lib/postfix/local: bad command startup -- throttling
|
and mail.log:
Code: |
...
Mar 3 02:04:27 gentoo postfix/master[27659]: warning: process /usr/lib/postfix/local pid 29796 exit status 1
Mar 3 02:04:27 gentoo postfix/master[27659]: warning: /usr/lib/postfix/local: bad command startup -- throttling
Mar 3 02:05:27 gentoo postfix/local[29800]: fatal: open database /etc/mail/aliases.db: No such file or directory
Mar 3 02:05:28 gentoo postfix/master[27659]: warning: process /usr/lib/postfix/local pid 29800 exit status 1
Mar 3 02:05:28 gentoo postfix/master[27659]: warning: /usr/lib/postfix/local: bad command startup -- throttling
Mar 3 02:06:28 gentoo postfix/local[29803]: fatal: open database /etc/mail/aliases.db: No such file or directory
Mar 3 02:06:29 gentoo postfix/master[27659]: warning: process /usr/lib/postfix/local pid 29803 exit status 1
Mar 3 02:06:29 gentoo postfix/master[27659]: warning: /usr/lib/postfix/local: bad command startup -- throttling
Mar 3 02:07:29 gentoo postfix/local[29805]: fatal: open database /etc/mail/aliases.db: No such file or directory
Mar 3 02:07:30 gentoo postfix/master[27659]: warning: process /usr/lib/postfix/local pid 29805 exit status 1
Mar 3 02:07:30 gentoo postfix/master[27659]: warning: /usr/lib/postfix/local: bad command startup -- throttling
Mar 3 02:08:30 gentoo postfix/local[29808]: fatal: open database /etc/mail/aliases.db: No such file or directory
Mar 3 02:08:31 gentoo postfix/master[27659]: warning: process /usr/lib/postfix/local pid 29808 exit status 1
Mar 3 02:08:31 gentoo postfix/master[27659]: warning: /usr/lib/postfix/local: bad command startup -- throttling
|
|
|
Back to top |
|
 |
CanuckNJE n00b

Joined: 17 Nov 2003 Posts: 24
|
Posted: Wed Mar 03, 2004 12:11 am Post subject: |
|
|
In the Postfix FAQ they said to issue the command
So I did this, and restarted postfix, and the mail still doesn't go through
mail.err has a new line though:
Code: | Mar 3 02:37:47 gentoo imapd: DISCONNECTED, user=root, ip=[::ffff:127.0.0.1], headers=0, body=0 |
mail.info now has:
Code: | Mar 3 02:59:00 gentoo postfix/postfix-script: starting the Postfix mail system
Mar 3 02:59:00 gentoo postfix/master[30153]: daemon started -- version 2.0.16
Mar 3 02:59:11 gentoo imapd: Connection, ip=[::ffff:127.0.0.1]
Mar 3 02:59:15 gentoo imapd: LOGIN, user=root, ip=[::ffff:127.0.0.1], protocol=IMAP
Mar 3 02:59:31 gentoo postfix/pickup[30162]: D2AE94009DBA: uid=0 from=<root>
Mar 3 02:59:31 gentoo postfix/cleanup[30172]: D2AE94009DBA: message-id=<20040303075931.GA30164@gentoo.mydomainMar 3 02:59:31 gentoo postfix/qmgr[30163]: D2AE94009DBA: from=<root@gentoo.mydomain.com>, size=485, n$
Mar 3 02:59:32 gentoo postfix/smtp[30174]: D2AE94009DBA: to=<xxx@yahoo.com>, relay=smtp.charter.net[209.225.8.224],$
Mar 3 02:59:50 gentoo postfix/pickup[30162]: C1D424009DBA: uid=0 from=<root>
Mar 3 02:59:50 gentoo postfix/cleanup[30172]: C1D424009DBA: message-id=<20040303075950.GB30164@gentoo.mydomain$
Mar 3 02:59:50 gentoo postfix/qmgr[30163]: C1D424009DBA: from=<root@gentoo.mydomain.com>, size=488, n$
Mar 3 02:59:51 gentoo postfix/smtp[30174]: C1D424009DBA: to=<xxx@ecs.umass.edu>, relay=smtp.charter.net[209.225.8.22$
Mar 3 02:59:52 gentoo imapd: LOGOUT, user=root, ip=[::ffff:127.0.0.1], headers=0, body=0
|
and mail.log has:
Code: | Mar 3 02:31:54 gentoo postfix/local[29861]: D166E4009DB3: to=<root@gentoo.mydomain.com>, relay=local, delay=29851, status=sent ("|/usr/bin/procmail")
Mar 3 02:32:41 gentoo imapd: Connection, ip=[::ffff:127.0.0.1]
Mar 3 02:32:45 gentoo imapd: LOGIN, user=tim, ip=[::ffff:127.0.0.1], protocol=IMAP
Mar 3 02:33:00 gentoo postfix/pickup[29743]: 628AE4009DB3: uid=1000 from=<tim>
Mar 3 02:33:00 gentoo postfix/cleanup[29876]: 628AE4009DB3: message-id=<20040303073300.GA29868@gentoo.mydomain.com>
Mar 3 02:33:00 gentoo postfix/qmgr[29058]: 628AE4009DB3: from=<tim@gentoo.mydomain.com>, size=473, nrcpt=1 (queue active)
Mar 3 02:33:04 gentoo postfix/smtp[29878]: 628AE4009DB3: to=<xxx@yahoo.com>, relay=smtp.charter.net[209.225.8.224], delay=4, status=sent (250 2.0.0 i22NWRbM096237 Message accepted for delivery)
Mar 3 02:33:39 gentoo imapd: LOGOUT, user=tim, ip=[::ffff:127.0.0.1], headers=0, body=0
Mar 3 02:37:02 gentoo imapd: Connection, ip=[::ffff:127.0.0.1]
Mar 3 02:37:05 gentoo imapd: LOGIN, user=root, ip=[::ffff:127.0.0.1], protocol=IMAP
Mar 3 02:37:22 gentoo postfix/pickup[29743]: D04AE4009DB8: uid=0 from=<root>
Mar 3 02:37:22 gentoo postfix/cleanup[29919]: D04AE4009DB8: message-id=<20040303073722.GA29911@gentoo.mydomain.com>
Mar 3 02:37:22 gentoo postfix/qmgr[29058]: D04AE4009DB8: from=<root@gentoo.mydomain.com>, size=490, nrcpt=1 (queue active)
Mar 3 02:37:23 gentoo postfix/smtp[29921]: D04AE4009DB8: to=<xxx@yahoo.com>, relay=smtp.charter.net[209.225.8.224], delay=1, status=sent (250 2.0.0 i22NanlV041392 Message accepted for delivery)
Mar 3 02:37:41 gentoo postfix/pickup[29743]: 5F55C4009DB8: uid=0 from=<root>
Mar 3 02:37:41 gentoo postfix/cleanup[29919]: 5F55C4009DB8: message-id=<20040303073741.GB29911@gentoo.mydomain.com>
Mar 3 02:37:41 gentoo postfix/qmgr[29058]: 5F55C4009DB8: from=<root@gentoo.mydomain.com>, size=491, nrcpt=1 (queue active)
Mar 3 02:37:41 gentoo postfix/smtp[29921]: 5F55C4009DB8: to=<xxx@ecs.umass.edu>, relay=smtp.charter.net[209.225.8.224], delay=0, status=sent (250 2.0.0 i22Nb7qW043588 Message accepted for delivery)
Mar 3 02:37:47 gentoo imapd: DISCONNECTED, user=root, ip=[::ffff:127.0.0.1], headers=0, body=0
Mar 3 02:58:58 gentoo postfix/postfix-script: stopping the Postfix mail system
Mar 3 02:58:58 gentoo postfix/master[27659]: terminating on signal 15
Mar 3 02:59:00 gentoo postfix/postfix-script: starting the Postfix mail system
Mar 3 02:59:00 gentoo postfix/master[30153]: daemon started -- version 2.0.16
Mar 3 02:59:11 gentoo imapd: Connection, ip=[::ffff:127.0.0.1]
Mar 3 02:59:15 gentoo imapd: LOGIN, user=root, ip=[::ffff:127.0.0.1], protocol=IMAP
Mar 3 02:59:31 gentoo postfix/pickup[30162]: D2AE94009DBA: uid=0 from=<root>
Mar 3 02:59:31 gentoo postfix/cleanup[30172]: D2AE94009DBA: message-id=<20040303075931.GA30164@gentoo.mydomain.com>
Mar 3 02:59:31 gentoo postfix/qmgr[30163]: D2AE94009DBA: from=<root@gentoo.mydomain.com>, size=485, nrcpt=1 (queue active)
Mar 3 02:59:32 gentoo postfix/smtp[30174]: D2AE94009DBA: to=<xxx@yahoo.com>, relay=smtp.charter.net[209.225.8.224], delay=1, status=sent (250 2.0.0 i22NwwWx075780 Message accepted for delivery)
Mar 3 02:59:50 gentoo postfix/pickup[30162]: C1D424009DBA: uid=0 from=<root>
Mar 3 02:59:50 gentoo postfix/cleanup[30172]: C1D424009DBA: message-id=<20040303075950.GB30164@gentoo.mydomain.com>
Mar 3 02:59:50 gentoo postfix/qmgr[30163]: C1D424009DBA: from=<root@gentoo.mydomain.com>, size=488, nrcpt=1 (queue active)
Mar 3 02:59:51 gentoo postfix/smtp[30174]: C1D424009DBA: to=<xxx@ecs.umass.edu>, relay=smtp.charter.net[209.225.8.224], delay=1, status=sent (250 2.0.0 i22NxHGc096831 Message accepted for delivery)
Mar 3 02:59:52 gentoo imapd: LOGOUT, user=root, ip=[::ffff:127.0.0.1], headers=0, body=0
|
But no email gets through
BTW my system clock is screwed up... I can't figure out the 'date' command, it keeps bitching about 'invalid format' What is the best way to change my clock?[ |
|
Back to top |
|
 |
kashani Advocate


Joined: 02 Sep 2002 Posts: 2032 Location: San Francisco
|
Posted: Wed Mar 03, 2004 12:57 am Post subject: |
|
|
kashani@azul kashani $ date
Tue Mar 2 16:49:59 PST 2004
kashani@azul kashani $ date --set='Tue Mar 2 17:49:23 PST 2004'
mail.log is plenty, no need to include the other two as it's all the same stuff. Also trim it down to one transaction, we don't need to see imap checks and other nonsense.
Accoding to your last few lines in mail.log it looks like mail is leaving the system and being marked as delievered which is what happens when the accepting system passes a 250 code back.
Are you seeing problems sending email out fo the system or accepting emails? Your post was not very clear.
kashani _________________ Will personally fix your server in exchange for motorcycle related shop tools in good shape. |
|
Back to top |
|
 |
CanuckNJE n00b

Joined: 17 Nov 2003 Posts: 24
|
Posted: Wed Mar 03, 2004 5:18 am Post subject: |
|
|
Well, what I want to do is to be able to send mail from my computer using a program like mutt, pine, or squirrelmail using postfix via smtp, so that postfix is not really a full blown MTA, but it just relays my mail via an smtp server. I will get around to configuring fetchmail next, but I want to get postfix sending mail first. So the problem that I am having is that if I open mutt with the command
Code: |
mutt -f imap://localhost |
And write and send an email. It seems to show up in the log as sent (well, now it does, before I was getting errors as you saw above), but now it never makes it to the address that I have sent it to.
I'm not sure what else I can tell you. Is there something specific that I'm leaving out that you need to know? |
|
Back to top |
|
 |
kashani Advocate


Joined: 02 Sep 2002 Posts: 2032 Location: San Francisco
|
Posted: Wed Mar 03, 2004 8:25 am Post subject: |
|
|
It's generally a bad idea to test more that one thing at a time. What if mutt is broken? or imap? or Postfix? This is why I prefer to test from the command line and limit the number of variables being tested.
According to the logs it does look like it's leaving your Gentoo box and being accepted by the relay host at your ISP. I'd try sending to local account at your ISP first assuming you have an account there. Many of the larger email servers such as yahoo.com, hotmail.com, will quietly drop your message if the originating address isn't in DNS, fails to resolve, and a number of other things. You local ISP might not be a restrictive allowing you to see what's going on.
Also check to see if you've gotten any bounce backs. Mutt won't read .maildir/ files by default so you might be missing the bounces. Cruise your .maildir/ from the command line to see if there is anything in there.
kashani _________________ Will personally fix your server in exchange for motorcycle related shop tools in good shape. |
|
Back to top |
|
 |
CanuckNJE n00b

Joined: 17 Nov 2003 Posts: 24
|
Posted: Wed Mar 03, 2004 4:03 pm Post subject: |
|
|
OK, I've looked around my .maildir, and it seems to be pretty empty. What am I supposed to be looking for in here?
I've tried using mutt to send a mail to my ISP account as above, but it didn't go through. When I try to send an email via SquirrelMail I get:
Code: |
Warning: fsockopen(): unable to connect to localhost:25 in /var/www/localhost/htdocs/squirrelmail/class/deliver/Deliver_SMTP.class.php on line 40 |
SquirrelMail seems to be working fine, I can create directories in SM and they show up in my .maildir folder. I am able to login to my imap server directly with telnet
I setup the .maildir by hand. It is as follows:
Code: |
.maildir->
.Trash
.Drafts
.Sent
.Test
coureirimapkeywords
courierimapuiddb*
courierimapssubscribed*
cur
new
tmp
.Trash,.Drafts, .Sent, and .Test all contain->
cur
tmp
new
coureirimapkeywords
courierimapuiddb*
maildir |
Where the entries marked by a * are files, and the others are folders. |
|
Back to top |
|
 |
CanuckNJE n00b

Joined: 17 Nov 2003 Posts: 24
|
Posted: Wed Mar 03, 2004 4:27 pm Post subject: |
|
|
Well... I fixed that error in SM by running the conf.pl perl script, should of thought of that sooner. So, I changed the "server settings" to sendmail rather than smtp, and now SM sends the email that I write into the "sent" folder, but the email never shows up at the destination address. |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|