# Another postfix problem...



## frustphil (Sep 2, 2009)

pls tell me what's wrong with this...


```
[B]telnet localhost smtp[/B]
Trying 137.0.0.1...
Escape character is '^]'.
220 mailx.frustphil.com ESMTP Postfix
[B]ehlo mailx[/B]
250-mailx.frustphil.com
250-PIPELINING
250-SIZE 10240000
250-VRFY
250-ETRN
250-ENHANCEDSTATUSCODES
250-8BITMIME
250 DSN
[B]mail from: root[/B]
250 2.1.0 Ok
[B]rcpt to: root[/B]
250 2.1.5 Ok
data
354 End data with <CR><LF>.<CR><LF>
[B]test to root
[/B]
```

As you can see, the test to root didn't gain any output... I really have no idea... the system just turns unresponsive whenever I cme to that part...


----------



## DutchDaemon (Sep 2, 2009)

> ```
> telnet localhost smtp
> Trying [B][color="Red"]137[/color][/B].0.0.1...
> Escape character is '^]'.
> ...



Really?


----------



## DutchDaemon (Sep 2, 2009)

Oh, and:



> ```
> 354 End data with <CR><LF>.<CR><LF>
> test to root
> ```



The solution's right there. After the last line, press [enter][dot][enter]


----------



## frustphil (Sep 2, 2009)

sorry that should be 127...
thank you... =)


----------



## frustphil (Sep 2, 2009)

DutchDaemon said:
			
		

> Oh, and:
> 
> 
> 
> The solution's right there. After the last line, press [enter][dot][enter]



=) thank you again..

could you please confirm that what I just did was to test postfix?
If so, where can I find that message? From the tutorial that I am following, it says that it should be in /var/spool/mail.. but when I cd there, it says the mail directory does not exist. Am I missing something?


----------



## DutchDaemon (Sep 2, 2009)

I don't run Postfix, so I don't know exactly. You should be able to get some results from /var/log/maillog though.

The message was probably just delivered to /var/mail/root, no?


----------



## frustphil (Sep 2, 2009)

DutchDaemon said:
			
		

> I don't run Postfix, so I don't know exactly. You should be able to get some results from /var/log/maillog though.


says it's been delivered to mailbox, but I don't know where it is either. Gotta learn how to use whereis command properly...



> The message was probably just delivered to /var/mail/root, no?



Nope, there's no /mail/root directory...


----------



## DutchDaemon (Sep 2, 2009)

root should be a mailbox file in /var/mail/, to be precise.


----------



## vivek (Sep 2, 2009)

There is no need to use telnet (thought it gives more info) simply run:

```
mail -s 'Test' root
mail -s 'Test' you@gmail.com
```
Run this on 2nd terminal or screen session

```
tail -f /var/log/maillog
```
To read any system mail su to account

```
su - user
mail
```
just login as root and type mail

```
mail
```


----------



## rbelk (Sep 2, 2009)

frustphil, would you post part of /var/log/mailog, for us to help diagnose your problem.


----------



## frustphil (Sep 2, 2009)

@DutchDaemon: yup, but the mails are not there...

@vivek: thanks. I think you missed my point.. my point is mails should be delivered in /var/spool/mail instead of somewhere else. Now my question is, how do I know the location where postfix sends the mail in order to get an idea how did it go there. So in turn I would be able to change it to /var/spool/mail...


----------



## frustphil (Sep 2, 2009)

Sorry if I might sound arrogant or anything... English is not my native language... =)


----------



## DutchDaemon (Sep 2, 2009)

/var/spool is not meant as a mail delivery directory. In other words: it shouldn't contain mailboxes, only queued mail (mail that hasn't been, or cannot be, delivered yet). It's *spool*ed there for future delivery, not delivered there.


----------



## frustphil (Sep 2, 2009)

DutchDaemon said:
			
		

> /var/spool is not meant as a mail delivery directory. In other words: it shouldn't contain mailboxes, only queued mail (mail that hasn't been, or cannot be, delivered yet). It's *spool*ed there for future delivery, not delivered there.



yup just realized that... 
just solved it by editing main.cf...
thank you! =)


----------

