[SLE] IMAP HowTo (was re: POP Mail HOWTO?)
Having read what both Anders and Joanne had to say about setting up a simple mail server at home, I... um... flipped a coin, and went with Anders' version. So I followed the summary, as ammended in the follow-up message. He was specific about his procedure being intended for a fresh system with no previous mail-related config. So... yes... I reformatted and re-installed SUSE 10.1. Blew away everything, including /home - the only untouched partition was /data. I restarted several times while the installer/updater seemed to be working around the Online Update problems that plagued the early days of the release, and I appear to have gotten all the necessary updates installed. Then I tackled the mail setup following printouts of Anders' e-mails with the instructions. I did as much as I could as root, running SuSEconfig every time I turned around. As part of that effort, I created a link to my /data partition, and (as emphasized by Anders) made very sure that the target directory had the same ownership and permissions as the original mail landing spot in /var. Then I started everything and stood back and let it rip. I had been piling up mail on my ISP for some weeks (still am, since I used the 'keep' option until this is working), so fetchmail went and got thousands of messages. I have no idea where they went, but it took more than half an hour to get them all, via ADSL, the first time. Thereafter, connections took a few seconds, so I'm assuming it was getting mail that hadn't already been retrieved in the first lengthy batch. I started Thunderbird to connect to Cyrus on the same machine. I answered its initial questions with responses that made sense to me at the time. At first it wouldn't connect, so I tweaked saslauth config and tried again. Thunderbird prompted for my password and then made satisfied noises, but no mail appeared in my INBOX (in Thunderbird). I spent a few hours reading stuff in the Cyrus docs and didn't really find anything that I was sure I should be tweaking, so I tried something else. I figure that all the downloading activity meant I must have thousands of messages SOMEwhere, and I tried to find 'em. I know that Cyrus doesn't use /Maildir, but I read that it _does_ store messages as individual files, and uses databases to handle all the meta info. I looked every place I could imagine, on both /var and my /data partition, as well as in /home (just in case), to no avail. If I've got a load of downloaded mail somewhere, it's well hidden. Meanwhile, I came into my office this morning and found dozens of bounce mails, from all the stuff that I'd sent/forwarded from office to home over the past several weeks. They looked like this: **************************************************** Subject: Undelivered Mail Returned to Sender This is the Postfix program at host junkbox.OURHOUSE. I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below. For further assistance, please send mail to <postmaster> If you do so, please include this problem report. You can delete your own text from the attached returned message. The Postfix program <elefino@localhost.junkbox.OURHOUSE> (expanded from <elefino@localhost>): Host or domain name not found. Name service error for name=localhost.junkbox.OURHOUSE type=AAAA: Host not found ************************************************************* Of course, I don't have a remote connection to fix anything at home, so it's going to be doing this to all my mailing lists and getting me disbarred, and possibly tarred and feathered. My real e-mail address is kevinmcl-â-magma.ca, my ISP being magma.ca. "Junkbox" is the hostname of the machine on which I've been trying to configure this domestic server, and "OURHOUSE" is a made-up 'domain' that I inserted when it appeared that I had to insert something. I guess that would have been in postfix config (main.cf), but I'm miles away from that box right now, so I can't check. Elefino is the username on that computer. I'm guessing that something, somewhere inserted "localhost" into the mix, because I never wrote that explicitly. Maybe it was a default that I didn't change in some config file, because it was not mentioned in Anders' instructions. Dunno. I thought I read (from Anders) that I should be able to follow his instructions as written to get a working IMAP server, and that if I foolishly _wanted_ to do additional config-file tweaking, that was 'beyond the scope' and asking for trouble. So, does this mean that my mail never did come in? That 30-to-40 minutes of modem activity and disk churning was for naught? Does it mean that the mail is all lying on my hard disk somewhere but Cyrus-IMAP didn't accept it? Does it mean that Cyrus-IMAP is not working? Or that Cyrus-IMAP has my mail, but isn't showing it to me (via Thunderbird) and isn't acknowledging to Postfix? At least, when I left this morning, there was no disk or modem activity, so I'll take comfort in the possibility that maybe I didn't also configure an open spam relay while goofing up everything else... Kevin (unserved, still) PS: Anders, hope your move to Germany went smoothly. PPS: Once all this was working, I was going to set up another address to be <postmaster>. The information contained in this electronic mail transmission may be privileged and confidential, and therefore, protected from disclosure. If you have received this communication in error, please notify us immediately by replying to this message and deleting it from your computer without copying or disclosing it. -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
mlist@safenet-inc.com wrote:
Having read what both Anders and Joanne had to say about setting up a simple mail server at home, I... um... flipped a coin, and went with Anders' version. So I followed the summary, as ammended in the follow-up message.
Postfix/Cyrus is not the most easy mailsystem to set up, despite what yast may claim. When I set up my system some years ago it took me days to get everything working as desired. And before you submit any real mail to your system you should be able to verify that Postfix/Cyrus are indeed working, before you enable fetchmail on your system.
I started Thunderbird to connect to Cyrus on the same machine. I answered its initial questions with responses that made sense to me at the time. At first it wouldn't connect, so I tweaked saslauth config and tried again. Thunderbird prompted for my password and then made satisfied noises, but no mail appeared in my INBOX (in Thunderbird). I spent a few hours reading stuff in the Cyrus docs and didn't really find anything that I was sure I should be tweaking, so I tried something else.
This ist the part that requires helpful people to have considerable psychic talents.
I figure that all the downloading activity meant I must have thousands of messages SOMEwhere, and I tried to find 'em. I know that Cyrus doesn't use /Maildir, but I read that it _does_ store messages as individual files, and uses databases to handle all the meta info. I looked every place I could imagine, on both /var and my /data partition, as well as in /home (just in case), to no avail. If I've got a load of downloaded mail somewhere, it's well hidden.
If in doubt have a look at the log of Postfix in /var/log/mail.
Meanwhile, I came into my office this morning and found dozens of bounce mails, from all the stuff that I'd sent/forwarded from office to home over the past several weeks. They looked like this: **************************************************** Subject: Undelivered Mail Returned to Sender
This is the Postfix program at host junkbox.OURHOUSE.
I'm sorry to have to inform you that your message could not be delivered to one or more recipients. It's attached below.
For further assistance, please send mail to <postmaster>
If you do so, please include this problem report. You can delete your own text from the attached returned message.
The Postfix program
<elefino@localhost.junkbox.OURHOUSE> (expanded from <elefino@localhost>): Host or domain name not found. Name service error for name=localhost.junkbox.OURHOUSE type=AAAA: Host not found
"localhost" ist not a fully qualified domain name, so Postfix adds the value of $myorigin to get a FQDN. You local domain name should have at least on dot in the domain name AND your own system should be able to resolve the name to the ip address. Bounces are bad. If you're really unlucky then all the mails that you fetched were bounced by Postfix and returned as undeliverable to the sender address. If you had a lot of spam in your mail people might start to hate you. (^-^) If postfix still has the mail queued then you should see a LOT of entries with the command "mailq". If so then you're lucky. Again, the logfile will tell you what happened.
************************************************************* Of course, I don't have a remote connection to fix anything at home, so it's going to be doing this to all my mailing lists and getting me disbarred, and possibly tarred and feathered.
Do yourself and everyone a favor and stop fetchmail before the irate mob starts to look for the big wooden neolithic club...
My real e-mail address is kevinmcl-â-magma.ca, my ISP being magma.ca. "Junkbox" is the hostname of the machine on which I've been trying to configure this domestic server, and "OURHOUSE" is a made-up 'domain' that I inserted when it appeared that I had to insert something. I guess that would have been in postfix config (main.cf), but I'm miles away from that box right now, so I can't check. Elefino is the username on that computer. I'm guessing that something, somewhere inserted "localhost" into the mix, because I never wrote that explicitly. Maybe it was a default that I didn't change in some config file, because it was not mentioned in Anders' instructions. Dunno. I thought I read (from Anders) that I should be able to follow his instructions as written to get a working IMAP server, and that if I foolishly _wanted_ to do additional config-file tweaking, that was 'beyond the scope' and asking for trouble.
So, does this mean that my mail never did come in? That 30-to-40 minutes of modem activity and disk churning was for naught? Does it mean that the mail is all lying on my hard disk somewhere but Cyrus-IMAP didn't accept it? Does it mean that Cyrus-IMAP is not working?
The mails probably never reached Cyrus at all.
Or that Cyrus-IMAP has my mail, but isn't showing it to me (via Thunderbird) and isn't acknowledging to Postfix?
At least, when I left this morning, there was no disk or modem activity, so I'll take comfort in the possibility that maybe I didn't also configure an open spam relay while goofing up everything else...
As long as your Postfix is not listening on your internet address you're probably save. In order to really help you send: - the output of "postconf -n" - /etc/sysconfig/saslauthd - the output of "ls -l /var/lib/sasl2" - /etc/imapd.conf - /etc/cyrus.conf Sandy -- List replies only please! Please address PMs to: news-reply2 (@) japantest (.) homelinux (.) com -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
On Monday 24 July 2006 06:06, mlist@safenet-inc.com wrote:
Thunderbird prompted for my password and then made satisfied noises, but no mail appeared in my INBOX (in Thunderbird). I spent a few hours reading stuff in the Cyrus docs and didn't really find anything that I was sure I should be tweaking, so I tried something else.
Are you, per chance, running something in addition to Cyrus? Some people, out of habit, run qpopper, an totally blow off the message cyrus spews about not being able to open port 110. Cyrus does both imap and pop3, and once configured correctly you can do either, or both at to the same account switching back and forth if needed. Its a monster compared to the pervious imapd and qpopper, but it does work eventually. Gets even crazier when you throw ldap into the mix. -- _____________________________________ John Andersen
John Andersen wrote:
On Monday 24 July 2006 06:06, mlist@safenet-inc.com wrote:
Thunderbird prompted for my password and then made satisfied noises, but no mail appeared in my INBOX (in Thunderbird). I spent a few hours reading stuff in the Cyrus docs and didn't really find anything that I was sure I should be tweaking, so I tried something else.
Are you, per chance, running something in addition to Cyrus? Some people, out of habit, run qpopper, an totally blow off the message cyrus spews about not being able to open port 110.
A very good question. (^-^) It's also possible, that qpopper is started from within xinetd. Again, the logfile will tell you. What does the log /var/log/messages say, when you start Cyrus?
Cyrus does both imap and pop3, and once configured correctly you can do either, or both at to the same account switching back and forth if needed.
Some days ago I decided to configure some pop accounts (only used imap before) and ran into the /dev/random problem. I was lazy and simply set "allowapop:0" in /etc/imapd.conf. This is still Suse 9.2, do you know if the problem still persists in Suse 10.x?
Its a monster compared to the pervious imapd and qpopper, but it does work eventually. Gets even crazier when you throw ldap into the mix.
Backup is also a bitch, but the features are indeed nice. (^-^) Sandy -- List replies only please! Please address PMs to: news-reply2 (@) japantest (.) homelinux (.) com -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
On Tuesday 25 July 2006 00:04, Sandy Drobic wrote:
Some days ago I decided to configure some pop accounts (only used imap before) and ran into the /dev/random problem. I was lazy and simply set "allowapop:0" in /etc/imapd.conf. This is still Suse 9.2, do you know if the problem still persists in Suse 10.x?
Don't know. I had to use Cyrus on a SLES 9 Server for a customer but I can't justify the pain for my local 10.1 machine. I'm tolerating postfix, but if it gives me any more lip I'm going back to sendmail. My general opinion is that Postfix set out to solve all the problems of sendmail and created a whole new set of problems in the process. Cyrus attempts a unified approach to delivery, and if they can make it a little easier to install, and incorporate the saslauthd part, the virus scanning, the spam scanning it would be great. But by the time you add up postfix, amavis, spamassassin, vscan(of some variety) cyrus, and sieve scripts, you have a very difficult install. Throw in ldap, (or worse, some off-machine authentication) and it gets nasty. -- _____________________________________ John Andersen
John Andersen wrote:
On Tuesday 25 July 2006 00:04, Sandy Drobic wrote:
Some days ago I decided to configure some pop accounts (only used imap before) and ran into the /dev/random problem. I was lazy and simply set "allowapop:0" in /etc/imapd.conf. This is still Suse 9.2, do you know if the problem still persists in Suse 10.x?
Don't know. I had to use Cyrus on a SLES 9 Server for a customer but I can't justify the pain for my local 10.1 machine.
I'm tolerating postfix, but if it gives me any more lip I'm going back to sendmail. My general opinion is that Postfix set out to solve all the problems of sendmail and created a whole new set of problems in the process.
Postfix definitely has a different philosophy. I never even started to dig into sendmail and chose Postfix as my default MTA. I don't regret it, but I also spend a LOT of time to get familiar with the concepts. If you have a good solid understanding of sendmail why not use it? For various reasons sendmail didn't appeal to me, and I liked the way Postfix is configured and debugged.
Cyrus attempts a unified approach to delivery, and if they can make it a little easier to install, and incorporate the saslauthd part, the virus scanning, the spam scanning it would be great.
I feel more comfortable with dedicated tools that I can chain together as needed than one huge bloated application that is authenticating, reading, filtering and commenting my mails. Such an all-in-one app is either running or broken beyond any hope, no leeway and difficult to debug.
But by the time you add up postfix, amavis, spamassassin, vscan(of some variety) cyrus, and sieve scripts, you have a very difficult install. Throw in ldap, (or worse, some off-machine authentication) and it gets nasty.
Try it with ldap/sql synchronisation, connection caching, round-robin dns for multiple host resolution, individual sql based policies in amavisd-new and policyd, and you have true hell. (^-^) Fortunately, I don't have the need for such a big infrastructure. Well, at least now I don't need it. Who knows what will happen in the future. (^-^) Sandy -- List replies only please! Please address PMs to: news-reply2 (@) japantest (.) homelinux (.) com -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
On Wed, 26 Jul 2006 04:15 am, Sandy Drobic wrote:
John Andersen wrote:
On Tuesday 25 July 2006 00:04, Sandy Drobic wrote:
Some days ago I decided to configure some pop accounts (only used imap before) and ran into the /dev/random problem. I was lazy and simply set "allowapop:0" in /etc/imapd.conf. This is still Suse 9.2, do you know if the problem still persists in Suse 10.x?
I'm a convert to dovecot for pop3, pop3s, imap, and imaps. It exists as an RPM for all SuSEs since 9.2. For 10.0 and 10.1 you may have to get it from an install repository, I couldn't find it on the DVDs. Take a look at the config file /etc/dovecot/dovecot.conf everything you want, simply presented. The developer is on the ball too.
Don't know. I had to use Cyrus on a SLES 9 Server for a customer but I can't justify the pain for my local 10.1 machine.
I'm tolerating postfix, but if it gives me any more lip I'm going back to sendmail. My general opinion is that Postfix set out to solve all the problems of sendmail and created a whole new set of problems in the process. Too right!
I had to set up sendmail for a university, using an M4 generated sendmail.cf that then had to be hand-tweaked. I'm NEVER going back there again. So I too tolerate postfix, but I do miss the sendmail test commands that give you the ability to ask questions like, "If sendmail.cf.new was the configuration file, what would happen to this email?" The postfix lists get all snotty when asked about this, and lecture about security. Sounds suspiciously like that kind of security that's so secure, no-one, not even the administrator, is allowed to know what's going on. Would exim be any better? Don't know. Dovecot IS better though... my $.02, michaelj -- Michael James michael.james@csiro.au System Administrator voice: 02 6246 5040 CSIRO Bioinformatics Facility fax: 02 6246 5166 No matter how much you pay for software, you always get less than you hoped. Unless you pay nothing, then you get more. -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
Michael James wrote:
On Wed, 26 Jul 2006 04:15 am, Sandy Drobic wrote:
John Andersen wrote:
On Tuesday 25 July 2006 00:04, Sandy Drobic wrote:
Some days ago I decided to configure some pop accounts (only used imap before) and ran into the /dev/random problem. I was lazy and simply set "allowapop:0" in /etc/imapd.conf. This is still Suse 9.2, do you know if the problem still persists in Suse 10.x?
I'm a convert to dovecot for pop3, pop3s, imap, and imaps. It exists as an RPM for all SuSEs since 9.2. For 10.0 and 10.1 you may have to get it from an install repository, I couldn't find it on the DVDs. Take a look at the config file /etc/dovecot/dovecot.conf everything you want, simply presented. The developer is on the ball too.
Don't know. I had to use Cyrus on a SLES 9 Server for a customer but I can't justify the pain for my local 10.1 machine.
I'm tolerating postfix, but if it gives me any more lip I'm going back to sendmail. My general opinion is that Postfix set out to solve all the problems of sendmail and created a whole new set of problems in the process. Too right!
I had to set up sendmail for a university, using an M4 generated sendmail.cf that then had to be hand-tweaked. I'm NEVER going back there again.
So I too tolerate postfix, but I do miss the sendmail test commands that give you the ability to ask questions like, "If sendmail.cf.new was the configuration file, what would happen to this email?" The postfix lists get all snotty when asked about this, and lecture about security. Sounds suspiciously like that kind of security that's so secure, no-one, not even the administrator, is allowed to know what's going on.
Usually they are rather helpful, if you ask Postfix questions and show your config and log excerpts. The reason is probably that they can tell you what will happen once they see the config, there is no need for blackbox behaviour like "if I push in mail here, twiddle with button one, three and four, what will come out?" Do not expect Postfix to read your mind and then work magic. (^-^)
Would exim be any better? Don't know.
I don't know either. For me, Postfix works best because I understand Postfix. If I had started working with Sendmail and had spend month to understand Sendmail, I probably wouldn't use Postfix.
Dovecot IS better though...
You mean compared to Cyrus? At least it should be easier to configure, backup, restore and migrate. I definitely want a good and up-to-date book on imap servers for enterprise use. Currently there doesn't seem to be one. Sandy -- List replies only please! Please address PMs to: news-reply2 (@) japantest (.) homelinux (.) com -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
On Tuesday 25 July 2006 10:15, Sandy Drobic wrote:
If you have a good solid understanding of sendmail why not use it? For various reasons sendmail didn't appeal to me, and I liked the way Postfix is configured and debugged.
Breaks the hell out of SLES9. I don't want to hack the machines where I run SLES because I manage those machines under contract, and for professional reasons I need to be able to walk away from them or turn them over to another sysadmin with a clean conscious. I try to keep those stock. My machines run sendmail, except this 10.1 machine where I decided its about time I get more familiar with Postfix. -- _____________________________________ John Andersen
John Andersen wrote:
On Tuesday 25 July 2006 10:15, Sandy Drobic wrote:
If you have a good solid understanding of sendmail why not use it? For various reasons sendmail didn't appeal to me, and I liked the way Postfix is configured and debugged.
Breaks the hell out of SLES9. I don't want to hack the machines where I run SLES because I manage those machines under contract, and for professional reasons I need to be able to walk away from them or turn them over to another sysadmin with a clean conscious.
I try to keep those stock.
Good reason, I hope the configuration is not too complicated.
My machines run sendmail, except this 10.1 machine where I decided its about time I get more familiar with Postfix.
Once you have a firm grip on the basics of Postfix you should be fine. I recommend "The Book of Postfix" by Ralf Hildebrand and Patrick Koetter. The have announced an update of their book, hopefully within this year. Do not be too impatient, just try to remember how long it took your to deal with Sendmail in a confident manner and give Postfix at least half that time. (^-^) Sandy -- List replies only please! Please address PMs to: news-reply2 (@) japantest (.) homelinux (.) com -- Check the headers for your unsubscription address For additional commands send e-mail to suse-linux-e-help@suse.com Also check the archives at http://lists.suse.com Please read the FAQs: suse-linux-e-faq@suse.com
participants (4)
-
John Andersen
-
Michael James
-
mlist@safenet-inc.com
-
Sandy Drobic