# postfix does not deliver mails

## Jeena

Hi there,

I'm trying to set up a mailserver with help of this howto: http://www.gentoo.org/doc/en/virt-mail-howto.xml I am able to send mails to outside but not to get any mail. There is no mail in /root/.maildir/cur/ and not in /home/jeena/.maildir/cur/ either. Postfix is running, but there is somewere a configuration error or something like that, becourse I get this errors in my log:

```
Mar  6 18:37:49 luna postfix/qmgr[17066]: warning: premature end-of-input on private/local socket while reading input attribute name

Mar  6 18:37:49 luna postfix/qmgr[17066]: warning: private/local socket: malformed response

Mar  6 18:37:49 luna postfix/qmgr[17066]: warning: transport local failure -- see a previous warning/fatal/panic logfile record for the problem description

Mar  6 18:37:49 luna postfix/master[17060]: warning: process /usr/lib/postfix/local pid 17131 exit status 1

Mar  6 18:37:49 luna postfix/master[17060]: warning: /usr/lib/postfix/local: bad command startup -- throttling
```

Here some more information (I changed my domain to example.com):

```
luna # postconf -n

command_directory = /usr/sbin

config_directory = /etc/postfix

daemon_directory = /usr/lib/postfix

debug_peer_level = 2

default_destination_concurrency_limit = 20

home_mailbox = .maildir/

html_directory = /usr/share/doc/postfix-2.2.5/html

inet_interfaces = all

local_destination_concurrency_limit = 2

mail_owner = postfix

mailq_path = /usr/bin/mailq

manpage_directory = /usr/share/man

mydestination = $myhostname, localhost.$mydomain $mydomain

mydomain = example.com

myhostname = example.com

mynetworks = 85.214.45.154/32, 127.0.0.0/8

newaliases_path = /usr/bin/newaliases

queue_directory = /var/spool/postfix

readme_directory = /usr/share/doc/postfix-2.2.5/readme

sample_directory = /etc/postfix

sendmail_path = /usr/sbin/sendmail

setgid_group = postdrop

unknown_local_recipient_reject_code = 550
```

```
luna # postqueue -p

-Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------

2E96935478      791 Mon Mar  6 16:47:01  zwiebelkuchen@example.de

                                         jeena@example.com

3D79641A2C      404 Mon Mar  6 16:12:05  henryk@example.net

                                         postmaster@example.com

57F9F41A30     1191 Mon Mar  6 16:13:56  benjamin@example.org

                (delivery temporarily suspended: unknown mail transport error)

                                         jeena@example.com

-- 5 Kbytes in 3 Requests.
```

```
luna # telnet example.com 25

Trying 85.214.45.154...

Connected to example.com.

Escape character is '^]'.

220 example.com ESMTP Postfix
```

Does someone have an idea what I could do? I was reading forums and lists the last two days with no result.Last edited by Jeena on Tue Mar 07, 2006 5:49 am; edited 1 time in total

----------

## indynet

Do you have setup database support for virtual users? Your postconf doesnt have setup it, but the tutorial is about it. It is full output of postconf?

By my mean problem is that you dont have setup transport correctly http://www.postfix.org/transport.5.html

----------

## Jeena

No, I haven't setup this database support, because I'm only on the end of chapter 2. Postfix Basics and it says:

 *Quote:*   

> Note: I strongly recommend that you verify this basic postfix setup is functioning before you progress to the next step of the howto.

 

I first and only want to verify this basic postfix setup, before I do all the other stuff. Transport is first time mentioned in chapter 7, so I think one need it only if one uses a database, isn't it?

----------

## magic919

I generally find the error show up better at the point you start Postfix, rather than watching the logs later.

Could you start Postfix or just postfix reload and see what you get.  It might complain about aliases, for example.

----------

## indynet

 *Jeena wrote:*   

> No, I haven't setup this database support, because I'm only on the end of chapter

 

You havent set corretly yout hostname.Last edited by indynet on Tue Mar 07, 2006 6:29 pm; edited 1 time in total

----------

## Jeena

No errors when I restart postfix:

```
luna / # /etc/init.d/postfix restart

 * Stopping postfix ...                                                   [ ok ]

 * Starting postfix ...                                                   [ ok ]

luna / # 
```

That what was in the log cames up when one sends me an email.

 *Quote:*   

> Ohh, it is strange behaviour. You havent set corretly yout hostname.

 

Oha, what should be the hostname?

----------

## lesourbe

 *Quote:*   

> I am able to send mails to outside but not to get any mail.

 

If you don't get mails, don't blame postfix, it's only a smtp server, it won't deliver a thing to your local mailbox. You should look at whatever imap/pop daemon you are running.

----------

## Jeena

 *lesourbe wrote:*   

>  *Quote:*   I am able to send mails to outside but not to get any mail. 
> 
> If you don't get mails, don't blame postfix, it's only a smtp server, it won't deliver a thing to your local mailbox. You should look at whatever imap/pop daemon you are running.

 

So? Which imap/pop daemon am I running? I never installed one since they don't mention it in this howto :-/.

----------

## indynet

 *Jeena wrote:*   

> So? Which imap/pop daemon am I running? I never installed one since they don't mention it in this howto :-/.

 

You arent running imap/pop3 daemon. Courier-imap part 3 of howto. You are just before it.

----------

## Jeena

But the howto says:

 *Quote:*   

> Now that postfix is running, fire up your favorite console mail client and send yourself an email. I use mutt for all my console mail. Verify that postfix is delivering mail to local users, once that's done, we're on to the next step. 
> 
> Note: I strongly recommend that you verify this basic postfix setup is functioning before you progress to the next step of the howto. 

 

Should I go to the next step without verifing?

----------

## indynet

So your hostaname should be $host.$domainname not yust domainame

If you send email from local machine its work? Send to yourself too...  Not working too?

Yes, you should go to the next step without verifing...

----------

## lesourbe

if you can send mail, postfix works ... test succeed : congratulations  :Smile: 

----------

## Jeena

 *Quote:*   

> So your hostaname should be $host.$domainname not yust domainame 

 

If I write this string "myhost = $host.$domainname" into main.cf postfix won't start. If I write "myhost = example.com" it starts.

If I write an email to jeena@localhost thre is no mail in /home/jeena/.maildir/cur/

```
if you can send mail, postfix works ... test succeed : congratulations
```

But what with this "Verify that postfix is delivering mail to local user"?

Ok I'll go to the next step and try this ;-).

----------

## dreamwolf

 *Jeena wrote:*   

> I'm trying to set up a mailserver with help of this howto: http://www.gentoo.org/doc/en/virt-mail-howto.xml I am able to send mails to outside but not to get any mail. There is no mail in /root/.maildir/cur/ and not in /home/jeena/.maildir/cur/ either.
> 
> ...
> 
> I haven't setup this database support, because I'm only on the end of chapter 2. Postfix Basics and it says:
> ...

 

Postfix can't deliver local mail until you complete the setup/configuration. You have successfully verified that postfix is working by sending mail to the outside. You can feel confident in continuing with the setup document.

dreamwolf

----------

## Jeena

Ok I went to step 3. Courier-imap did it and tried to send emails (works) and to get emails (whicht still doesn't work) :-/

----------

## indynet

 *Jeena wrote:*   

> 
> 
> If I write this string "myhostname = $host.$domainname" into main.cf postfix won't start.
> 
> 

 

Sure, you must use your data, it was just example. I dont know if your machine is gentoo.domain.com, server.domain.net or linux.domain.org 

And what is your correct domain name...

If you send email from local machine and you have correct setup hostname of it, your email address is root@gentoo.domain.com (of course just example)

And why to do? You have setup postfix configuration that use local transport for gentoo.domain.com and you have same email address...

I dont know if it works for localhost or something else, I have never problems with basic postfix setup, so I never try it.

----------

## magic919

 *lesourbe wrote:*   

>  *Quote:*   I am able to send mails to outside but not to get any mail. 
> 
> If you don't get mails, don't blame postfix, it's only a smtp server, it won't deliver a thing to your local mailbox. You should look at whatever imap/pop daemon you are running.

 

Hmm.  Postfix does incorporate an LDA.  Virtual and Local are capable of delivery.  Don't confuse this with IMAP/POP servers as they only serve up the email once it has been delivered to maildir or similar.  It can do LMTP too, for that matter.

----------

## Jeena

Hm ok, but I have no idea what my hostname ist. How can I find it out? The correct domainname is al-score.com and the IP is 85.214.45.154 and I am the admin of this server so I'm setting up it (I try to ;-) )

----------

## indynet

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?full=1

nano -w /etc/conf.d/hostname

(Set the HOSTNAME variable to your hostname, I choose mailhost)

HOSTNAME="mailhost"

# nano -w /etc/conf.d/domainname

(Set the DNSDOMAIN variable to your domain name)

DNSDOMAIN="al-score.com"

Than modify MX record for your domain to mailhost.al-score.com

and of course change reverse DNS to mailhost.al-score.com  (otherwise some antispam filters mark you as spamer)

that is all. 

Please send me output of /etc/hosts if there is something.

So than you will have setup basic groundwork for full working MTA.

If you will have any questions, please feel free to contact me on ICQ 155489915

----------

## Jeena

Ok thanks guys and girls for all the help, it works now, I don't really know why, but it works ;-)

I changed this two lines to:

```
manpage_directory = /usr/share/man

mydestination = al-score.com, luna.al-score.com, luna
```

I think I don't need this luna hostname, but it works with it, I'll test it without, or better try to change the mx record to this hostname.

After rebooting the machine it worked!!! So it nothing works, try to reboot, perhapt this helps.

 /Jeena

----------

