You are not logged in.

#1 2005-01-14 13:33:26

crobot
Member
Registered: 2004-10-08
Posts: 25

Arch local mail system.

I'll be the first to admit i'm extremely uneducated when it comes to mail on linux; am i just stupid, or is it a real nightmare to set up? All i'm after is a basic local mail system, so that i can receive alerts and log messages via a mail dir of some sort, and pick them up with kmail. from what i can see Arch doesn't come with one by default, and the wiki postfix guide (and the majority of howtos that i've read) seem to be focused on bigger setups, expecting the user to have a domain name etc. Is it simple to set up such a system, or should i give up now?

Thanks for any info,

Crobot

Offline

#2 2005-01-14 18:05:22

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: Arch local mail system.

for strictly local delivery, it is not that hard. I will try to locate some reference material for you later this afternoon. Maybe someone else can in the meantime.


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#3 2005-01-16 05:54:24

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: Arch local mail system.

http://wiki2.archlinux.org/index.php/Ho … %20Postfix

Not much there yet..feeling a bit crappy today, but I will make an effort to get something done in the near future...
I will post again when there is something more "meaty" there.

EDIT: Ok. Unfortunately, I haven't tested the configuration yet. I will throw it at an instance of vmware sometime in the next few days and see if it works right.


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#4 2005-01-16 15:58:23

crobot
Member
Registered: 2004-10-08
Posts: 25

Re: Arch local mail system.

Thanks for going to all this effort, i'm just trying it out now and will provide you with feedback.

Dan

Offline

#5 2005-01-16 16:40:32

crobot
Member
Registered: 2004-10-08
Posts: 25

Re: Arch local mail system.

I'm having two problems;

1. send-mail: warning: My hostname localhost is not a fully qualified name - set myhostname or mydomain in /etc/postfix/main.cf
postdrop: warning: My hostname localhost is not a fully qualified name - set myhostname or mydomain in /etc/postfix/main.cf

For some reason, leaving the myhostname option as default, didn't work. It was only when i specifically changed it to my current hostname that it started working. So problem number 1 is now solved.

2. I don't actually have a mailbox anywhere, there isn't one in my home dir or in /var/spool/mail.

Thanks again,

Dan

Offline

#6 2005-01-16 19:42:20

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: Arch local mail system.

1.
Gotcha. I have updated the how to doc to reflect this issue.

2.
Have you sent yourself mail? I believe it only creates the mail dir initially once you recieve mail.
You should see it in
mail_spool_directory = /var/spool/mail

I believe it is set to /var/spool/mail by default. But again, you need to have an email sent before the dir is created. I will install it to test it today, and hopefully we can work out any other issues and get you up and running with local mail..

tongue


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#7 2005-01-16 19:59:37

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: Arch local mail system.

Ok. I installed it on a test setup, and got it working just fine. I modified the postfix doc to reflect the change.
I think you might have left out the comments on the previous things I listed, because I was able to get away with only specifying the following lines differently from the default settings as delivered by pacman.

inet_interfaces = localhost
mynetworks_style = host

The change is reflected in the wiki how to.

It also looks like mail is delivered to /var/mail/ by default..

(root@kif ~)# mail
No mail for root
(root@kif ~)# mail root
Subject: Test
Test mail.
.
EOT
(root@kif ~)# mail
Mail version 8.1 6/6/93.  Type ? for help.
"/var/mail/root": 1 message 1 new
>N  1 root@kif.solarnet     Sat Dec 18 09:08  14/414   "Test"
& d
& q

Note: I did not specify a map like I should have for root. I did in the wiki doc, but didn't here so I could test the install. You should not really be recieving mail as root. You shouldn't really be logging in as root either. 
roll
lol

So, I recommend uninstalling postfix
pacman -R postfix
Then deleting the contents of /etc/postfix
rm /etc/postfix/*
then reinstalling
pacman -Sy postfix
Then configuring as defined in the wiki doc. Post back if you achieve success or failure.
Hopefully the former.  wink


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#8 2005-01-17 10:32:04

cstorm
Member
Registered: 2004-11-08
Posts: 17

Re: Arch local mail system.

crobot wrote:

All i'm after is a basic local mail system, so that i can receive alerts and log messages via a mail dir of some sort, and pick them up with kmail. from what i can see Arch doesn't come with one by default, and the wiki postfix guide (and the majority of howtos that i've read) seem to be focused on bigger setups, expecting the user to have a domain name etc.

isn't postfix (a *real* mailserver) a bit too big for your only local mail purposes? i'm using nullmailer http://freshmeat.net/projects/nullmailer/ to get my mails off the system and a small python script for local delivery (from daemons, etc.) which injects mails to my mbox mailbox. if you're interested, i'll send the script to you (should be easy to adapt to maildir)

Offline

#9 2005-01-17 10:53:54

crobot
Member
Registered: 2004-10-08
Posts: 25

Re: Arch local mail system.

I've followed your post, but have come across both issues again;

send-mail: warning: My hostname crobot is not a fully qualified name - set myhostname or mydomain in /etc/postfix/main.cf
postdrop: warning: My hostname crobot is not a fully qualified name - set myhostname or mydomain in /etc/postfix/main.cf

Note: crobot is my chosen hostname, and this is my etc/hosts;


127.0.0.1       localhost.localdomain   localhost
192.168.0.2                                     crobot

The hostname command returns 'crobot' as expected.

So, once again i've changed the myhostname entry in /etc/postfix/main.cf to crobot, yet the mail dir is not being created in /var/mail. I've checked my mail.log and this is what is happening;

Jan 17 10:46:26 crobot postfix/pickup[7444]: AD8CFBC067: uid=0 from=<root>
Jan 17 10:46:26 crobot postfix/cleanup[9221]: AD8CFBC067: message-id=<20050117104626.AD8CFBC067@crobot>
Jan 17 10:46:26 crobot postfix/qmgr[7445]: AD8CFBC067: from=<root@crobot.crobot>, size=277, nrcpt=1 (queue active)
Jan 17 10:46:26 crobot postfix/smtp[9223]: AD8CFBC067: to=<root@crobot.crobot>, orig_to=<root>, relay=none, delay=0, status=bounced (Host or domain name not found. Name service error for name=crobot.crobot ty
pe=A: Host not found)
Jan 17 10:46:26 crobot postfix/cleanup[9221]: BC074BC068: message-id=<20050117104626.BC074BC068@crobot>
Jan 17 10:46:26 crobot postfix/qmgr[7445]: BC074BC068: from=<>, size=2029, nrcpt=1 (queue active)
Jan 17 10:46:26 crobot postfix/qmgr[7445]: AD8CFBC067: removed
Jan 17 10:46:26 crobot postfix/smtp[9223]: BC074BC068: to=<root@crobot.crobot>, relay=none, delay=0, status=bounced (Host or domain name not found. Name service error for name=crobot.crobot type=A: Host not f
ound)
Jan 17 10:46:26 crobot postfix/qmgr[7445]: BC074BC068: removed

So it appears to be appending my hostname as a domain name, which is why /var/mail/<user> isn't being created. How can i change this?

Thanks,

Dan

Offline

#10 2005-01-17 11:02:22

crobot
Member
Registered: 2004-10-08
Posts: 25

Re: Arch local mail system.

cstorm wrote:

isn't postfix (a *real* mailserver) a bit too big for your only local mail purposes? i'm using nullmailer http://freshmeat.net/projects/nullmailer/ to get my mails off the system and a small python script for local delivery (from daemons, etc.) which injects mails to my mbox mailbox. if you're interested, i'll send the script to you (should be easy to adapt to maildir)

Thanks for the suggestion, i've got to go out for a little while now, but when i return i'll have a closer look at nullmailer.

Dan

Offline

#11 2005-01-17 20:55:30

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: Arch local mail system.

ahh...
postfix wants a hostname with at least one dot in it. like crobot.localdomain
Then for the host it strips the stuff after the dot and uses the first part, uses the second part for the domain. It is likely borking because your hostname is only one unit and has not dot in it.

My /etc/rc.conf has
HOSTNAME="kif.solarnet"

alternatively, you could try specifying myhosthostname in /etc/postfix/main.cf to
myhostname=localhost.localdomain

mydomain will automatically pick off the end of that.

Or..you could try the nullmailer thing.


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#12 2005-01-17 22:50:30

crobot
Member
Registered: 2004-10-08
Posts: 25

Re: Arch local mail system.

Yes, that was the problem, i changed it to crobot.crobot and was able to receive the mail. I also commented out the myhostname option in /etc/postfix/main.cf, so the default works correctly now.

As i have postfix working, i see no immediate need to use nullmailer, but i may try it in the future, thanks for your suggestion though cstorm.

Thank you so much for your help cactus big_smile

Dan

Offline

#13 2005-01-18 01:57:26

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: Arch local mail system.

np. glad it is working for you.
big_smile  big_smile


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

Board footer

Powered by FluxBB