From FVue
(Redirected from Mail Journal Archive (SuSE))
Jump to: navigation, search


Start/stop/restart postfix

rcpostfix restart  // SuSE

Start/stop/restart fetchmail

rcfetchmail restart  // SuSE



  • Running postfix programs on my SuSE machine are:
me@linux:~> ps -ef | grep postfix
root      6872     1  0 21:15 ?        00:00:00 /usr/lib/postfix/master
postfix   6887  6872  0 21:15 ?        00:00:00 qmgr -l -t fifo -u
postfix   8043  6872  0 21:44 ?        00:00:00 pickup -l -t fifo -u
  • Mail transfer can be configured easily using {Control Center|YaST2 modules|Network Services|Mail Transfer Agent}?


  +-----+     +-----+     +------------+     +-----+
  | MTA +-->--+ MDA +-->--+ Mail store +-->--+ MUA |
  +-----+     +-----+     +------------+     +-----+

  MTA = Mail Transport Agent
  MDA = Mail Dispatch Agent
  MUA = Mail User Agent
  • Aliased me for root mail in /etc/aliases


It is the fetchmail process which is responsible for retrieving my e-mail:

/usr/bin/fetchmail -d 600 -a -f /etc/fetchmailrc -L /var/log/fetchmail

Connecting to my providers mail server tells me I'm using the ESMTP protocol:

me@linux:~> telnet 25
Connected to
Escape character is '^]'.
220 ESMTP Postfix


Fetchmail is delivering my e-mail to my unix-account (i.e. the file ~/mbox), accessible with mail (nail). How can I get it into mutt? Solution: specify in .muttrc: set spoolfile='/var/spool/mail/me'

There is a commented setting #home_mailbox = Maildir/ in my /etc/postfix/

E-mail info page with nice dataflow diagram


Added color index red default ~P to my .muttrc to get black letters on white background.

Command G says POP host is not defined.

Very verbose mutt 1.2 .muttrc example here. I'm using mutt version 1.5.9i though.

Seems like mutt is working ok. But postfix holds my sent messages in /var/spool/postfix/defer with an error message from my ISP mail host: 450 <>: Sender address rejected: Domain not found (in reply to RCPT TO command). Solution: when using mail, I have to specify -r from-addr to specify a valid e-mail address to be accepted by my ISP mail host. Now, how do I tell Mutt? By putting set from=... in ~/.muttrc.


+-----------+              +----------+
| fetchmail +---------<----+ INTERNET |
+---+-------+              +-----+----+
    |                            |
   -+----------------            |
   /var&047;spool/mail/me            ^
   ----+-------------            |
    v                            |
+---+--+                   +-----+---+
| mutt +--------->---------+ postfix |
+---+--+                   +-----+---+
    v                            v
   -+----                     ---+--------------
   ~/Mail (mbox)              /var&047;spool/postfix
   ------                     ------------------


It seems that after I manually edit my /etc/postfix/ to change myhostname it is being reset to its old value?

Another useful link: Mail server HOWTO - OpenSUSE

Mail sent by mutt is sent back as 'Undelivered Mail Returned to Sender' to ''? This is probably from my local machine – not my provider – because I specified myhostname = in and I'm me...

This seems to be it: leave myhostname to be my machine, but specify myorigin to be my e-mail provider's domain.


+-----------+            +-----------+              +----------+
| LOCALHOST |            | fetchmail +---------<----+ INTERNET |
+-----+-----+            +---+-------+              +-----+----+
      |                      |                            |
      |          ------------+-----                       |
      +---->-----/var&047;spool/mail/me                       ^
                 ------------+-----                       |
                             v                            |
                         +---+--+                   +-----+---+
                         | mutt +--------->---------+ postfix |
                         +---+--+                   +-----+---+
                             v                            v
                            -+----                     ---+--------------
                            ~/Mail (mbox)              /var&047;spool/postfix
                            ------                     ------------------

Why is mail normally stored in one folder? Shouldn't mail be stored per project? Let's take a look if mutt can provide the means. Maybe it's just like normal mail: you immediately get rid of the unwanted mail, archive the important mail and leave some mail for later perusal. Thus, I don't need that many folders for storing mail. With mutt, I can have any project have its own mailbox.

Another useful place for information is the mutt wiki.


When setting up another server via YaST, I receive this message:

To be able to deliver mail to your local MTA, the value of POSTFIX_LOCALDOMAINS
in /etc/sysconfig/postfix will be set to "\$myhostname, localhost.\$mydomain,


Again (see #20051114), the messages are in /var&047;spool/postfix/defer with error message: Host or domain name not found. Name service error for type=MX: Host not found, try again

Got error message from mutt when trying to send mail: ^: Permission denied (errno = 13). Removed ^ from Fcc and folder-hook . 'set record="^"' from muttrc, since the special meaning of ^ is available in mutt-1.5.10 and I'm using 1.5.9.

Google to the rescue: Sending mails to remote domains is not working. - HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials:.
All kinds of useful logs: /var/log/mail.err, /var/log/warn, /var/log/, /var/log/mail, /var/log/fetchmail. Fetchmail gives error message as well: fetchmail: couldn't find canonical DNS name of (
Forum also pointed me to /etc/resolv.conf which is empty indeed on my new system, filled on my old.

The postfix site: Postfix Frequently Asked Questions: Mail stays queued with: Host not found, try again.

Solution: I hadn't setup my DNS. Start YaST, {Network Services | DNS and Hostname}.


Cron mail isn't delivered locally. Local mail is delivered to my ISP. This is probably caused by setting myorigin to my ISP.


Yes, commenting myorigin makes local mail coming to my local mailbox again.

MAPS - Support - Application Note: How to route your outgoing mail through your Internet Service Provider's mail servers:

mydomain =
myorigin = $mydomain
relayhost =


But now Postfix refuses to sent local mail sent to my ISP, complaining '<>: unknown user: "me"'.

Must be because Postfix regards its own box as, can't find 'me' and errors. So the settings above from only works for e-mail addresses other than ...

It's in the manual: file:///usr/share/doc/packages/postfix/html/INSTALL.html. mydestination should not comprise mydomain.

mydomain =
myorigin = $mydomain
relayhost =
mydestination = $myhostname, localhost.$mydomain, localhost


Cron mail is still sent to (non-existing) me@myisp where it should be sent to me@localhost.

Starting from scratch. I want local mail delivered, and outgoing mail routed through myisp:

#myhostname =  # Leave to default ($HOSTNAME)
#mydomain =    # Leave to default
#myorigin =    # Leave to default ($myhostname) 
mydestination = $myhostname, localhost.$mydomain, localhost
relayhost =

Postfix complains in /var/log/mail:

May 27 12:20:01 mybox postfix/sendmail[29586]: warning: My hostname mybox is 
    not a fully qualified name - set myhostname or mydomain in /etc/postfix/
#myhostname =   # Leave to default ($HOSTNAME)
mydomain = site
#myorigin =    # Leave to default ($myhostname) 
mydestination = $myhostname, localhost.$mydomain, localhost
relayhost =

I sent mail via mutt with set from =, but message remains in queue:

 #> # Look into postfix queue
 #> postqueue -p
 -Queue ID- --Size-- ----Arrival Time---- -Sender/Recipient-------
 7B09C1AAAA      408 Sat May 27 12:46:51
 (host[] said: 450 <>: Sender address 
 rejected: Domain not found (in reply to RCPT TO command))

 #> # Delete queued message 
 #> postsuper -d 7B09C1AAAA


Postfix Address Rewriting: Generic mapping for outgoing SMTP mail


/usr/sbin/sendmail -bv

now returns:

Reporting-MTA: dns; mybox.mydomain
X-Postfix-Queue-ID: 0CD5C15DA0
X-Postfix-Sender: rfc822; me@mybox.mydomain
Arrival-Date: Sun, 28 May 2006 10:05:37 +0200 (CEST)

Final-Recipient: rfc822;
Action: deliverable
Status: 2.0.0
Diagnostic-Code: X-Postfix; delivery via[]: 250

So it works.

Is postfix revealing kind-of private information via X-Postfix-Sender?
It appears username is not revealed, but mybox.mydomain is...


Upgraded client to Ubuntu-10.04. To sent mail from client:

1. Create user mailbox file (as root):

cd /var/mail
touch myname
chown myname myname
chmod 600 myname

2. Install or re-configure postfix (as root):

dpkg-reconfigure  # Choose "Internet with smarthost"

And use the folling settings - after replacing DOMAIN, EMAIL, HOST, ISP, USER with current values:

$ cat /etc/postfix/
mydomain = DOMAIN
myhostname = HOST.DOMAIN
myorigin = $mydomain
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = $myhostname, localhost.$mydomain, localhost
relay_domains =
relayhost =
mynetworks = [::ffff:]/104 [::1]/128
mailbox_size_limit = 0 
recipient_delimiter = + 
inet_interfaces = all 

smtp_generic_maps = hash:/etc/postfix/generic
transport_maps    = hash:/etc/postfix/transport

$ cat /etc/postfix/generic

$ cat /etc/postfix/transport
# Internal delivery
# External delivery
*     smtp:[smtp.ISP.COUNTRY]

$ cat /etc/mailname  # Used by mutt

3. Create Postfix lookup tables (as root)

cd /etc/postfix
postmap generic
postmap transport

4. Restart postfix (as root)

sudo /etc/init.d/postfix reload


blog comments powered by Disqus