Anders Johansson [mailto:andjoh@rydsbo.net] kindly wrote:
Concept: A mail server that doesn't accept remote connections to deliver mail. Mail are fetched from a remote server that handles incoming connections, and delivered locally to an IMAP server (cyrus)
Packages needed: postfix, cyrus-imapd, fetchmail, fetchmailconf (GUI for configuration of fetchmail, not strictly needed)
If I run fetchmailconf while logged in as my regular user, am I creating one of those ~/fetchmailrc files that applies to just my user, or the general fetchmail config that applies to all mail (this user or other)? What I want is the general case. I guess I can just duplicate lines in the central conf file, changing my account specifics to my wife's, and then to the other user's... I have a big /data partition, and it would be handy if: a) fetchmail put the incoming mail there for all users b) Cyrus-IMAP knew to expect it / keep it there, rather than in some other (default?) place like /var/spool
I'm assuming either SUSE Linux 10.1 or SLES 10 here (note that in SLES 10 you can do this through the YaST mail server module as well)
I've got SUSE Linux 10.1 (DVD from the boxed set). Not SLES. I'm sure I recall running a YaST module about configuring mail. After I ran through it and gave it info about my mail account name, ISP's mail server, and other stuff, it ended, and I wasn't yet at a working mail system, which is when I started reading about Cyrus and IMAP and fetchmail and Postfix and Procmail and... getting more and more confused as I followed things that sorta made sense in their contexts (nobody in any FAQ, HowTo or mailing list thread was _ever_ trying to setup something as _simple_ as what I wanted).
Step 1: install the required packages.
Done with YaST.
Step 2: configure postfix edit /etc/sysconfig/postfix and change POSTFIX_LOCALDOMAINS to include your email domain. For example if you have an email address foo@bar.com it should be
POSTFIX_LOCALDOMAINS="bar.com"
So that would be the ISP's domain, since I don't have a domain (no DNS, no domain registered) on my home network. So far, so good.
also change POSTFIX_MDA so it reads
POSTFIX_MDA=cyrus
I believe that happened when I chose Cyrus during the YaST mail module process.
Then run SuSEconfig --module postfix
Don't think I _ever_ did that explicitly. It would've happened when I made changes via YaST. But those config options were so limited that I (read that I was required to) made further config settings later, with pico directly on main.cf. If I edit the postfix configuration file(s) I have to run SuSEconfig each time? Ah. That would explain some of the mess. Another problem with depending on YaST.
Step 3: start cyrus and its authentication daemon rccyrus start rcsaslauthd start
Step 4: restart postfix rcpostfix restart
OK. (He said, remembering that he did that, but not remembering if he did it in May or in one of the later attempts...)
You now have a working mail/IMAP server.
Really? So, where has the mail been placed? Does Cyrus do /Maildir format, MBox, or some other, and, if more than one, at what point was it told which one... and did fetchmail (or was that Postfix) need to be told something different, depending on which format Cyrus was going to use? I seem to remember something about /Maildir/ (with that trailing slash required) but I don't remember if that was in Postfix config or Dovecot config. So I'm _really_ not sure what goes where when you are using Cyrus instead.
At this point you need to create an account on the cyrus server. If you open an email client and configure as incoming account to point to the cyrus server, it will automagically create the account for you.
Too simple. I was trying to do the creation via the config. Either I did it wrong, or I did it right and then forgot to run SuSEConfig... or some third option that nevertheless caused non-workum.
However, by default the quota will be set to 10MB, which might be a little low for you( I know it is for me), so before you do this, you may want to edit /etc/imapd.conf and set autocreatequota: to something a little higher (it needs to be more than 0, otherwise the account won't be automatically created)
Ah. So Cyrus calls itself Cyrus in some cases and just imap in other cases. That'd be a parallel concept to Postfix presenting itself as sendmail... you do things your own way, but present a standardized face (in the case of postfix, the daemon name, and in the case of Cyrus-IMAP, the name of the configuration file) to the system? Hmm.
Step 5: configure fetchmail either manually, if you know the config file syntax, or through the fetchmailconf GUI
I'm not facing it right now, so I can't remember all the things that I had to guess what they meant in the fetchmail configuration (whether via GUI or editor). My first step was usually to go to the bottom of a config file, to see what YaST might have inserted/appended, before trying to figure out what to attempt next. Of course, if the bulk of the problem was forgetting to run SuSEConfig, then I tweaked a lot of stuff that I needn't have done, out of increasing frustration.
Step 6: run fetchmail If in the config you set it up as a daemon, run it as a daemon, otherwise set up a cron job to run it at regular intervals (not sure how specific I need to be about this step)
Maybe a little more, regarding what the differences would have looked like in the fetchmail config file. Also, can you briefly explain the advantages of either choice? Assume that if the machine is on, I want fetchmail to be checking out my ISP for new mail on my account, my wife's account, and at least one other, every ten or twenty minutes. That can be done with the daemon alive and waking itself for a mail run at the specified intervals, or with a cron job launching the executable at the interval, then killing it after it completes... each time? Why one or the other, or have I misunderstood? If there's stuff I should be checking, I'm currently on a Windows machine, about a 15K walk from my home Linux box (no remote access), so I'm working from memory just now. Kevin 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
From:
Anders Johansson [mailto:andjoh@rydsbo.net] kindly wrote:
Concept: A mail server that doesn't accept remote connections to deliver mail. Mail are fetched from a remote server that handles incoming connections, and delivered locally to an IMAP server (cyrus)
Packages needed: postfix, cyrus-imapd, fetchmail, fetchmailconf (GUI for configuration of fetchmail, not strictly needed)
If I run fetchmailconf while logged in as my regular user, am I creating one of those ~/fetchmailrc files that applies to just my user, or the general fetchmail config that applies to all mail (this user or other)?
What I want is the general case. I guess I can just duplicate lines in the central conf file, changing my account specifics to my wife's, and then to the other user's...
I have a big /data partition, and it would be handy if:
a) fetchmail put the incoming mail there for all users
Links exist. Use them. You could link the /var/spool/mail directory to that huge data partition. {^_-}
b) Cyrus-IMAP knew to expect it / keep it there, rather than in some other (default?) place like /var/spool
The /etc/profile line tells DoveCot where to go for the email. As it happens I store the incoming in the spool directory and the IMAP folders in the user's home directory. That is a more or less arbitrary decision, though. It can change. (Of course, I give /home its own partition as a precaution against new distribution install issues. And I make it plenty big enough.) {^_^} (Doesn't tend to trust omnibus configuration tools. YaST has not yet proven itself to me. And AppArmor already has shown deficiencies for what I want. {^_-}) -- 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 Thursday 20 July 2006 20:13, mlist@safenet-inc.com wrote:
If I run fetchmailconf while logged in as my regular user, am I creating one of those ~/fetchmailrc files that applies to just my user, or the general fetchmail config that applies to all mail (this user or other)?
It creates a fetchmailrc in your home directory. Which users are in it is up to you, you can stick them all in there, if you have their passwords on the remote server
I have a big /data partition, and it would be handy if:
a) fetchmail put the incoming mail there for all users b) Cyrus-IMAP knew to expect it / keep it there, rather than in some other (default?) place like /var/spool
fetchmail delivers to a local mail delivery agent, by default an SMTP server (postfix), which in turn delivers it to its final destination, in this case cyrus if you want cyrus to store things on your /data partition, simply create a directory there and make /var/spool/imap a symlink to it (make sure you get the same permissions on your new directory as for the original /var/spool/imap)
I'm assuming either SUSE Linux 10.1 or SLES 10 here (note that in SLES 10 you can do this through the YaST mail server module as well)
I've got SUSE Linux 10.1 (DVD from the boxed set). Not SLES. I'm sure I recall running a YaST module about configuring mail.
Read again. I said *In SLES* you can run a YaST module to do it. In 10.1, the instructions I posted are enough. My 'howto' expected a fresh system, with no previous configuration attempts.
Then run SuSEconfig --module postfix
Don't think I _ever_ did that explicitly. It would've happened when I made changes via YaST. But those config options were so limited that I (read that I was required to) made further config settings later, with pico directly on main.cf.
Then no part of my instructions will work, since SuSEconfig will not touch a file you've edited manually. If you want to do that, you need to study up on the config settings in main.cf, and things get more complicated at once
You now have a working mail/IMAP server.
Really? So, where has the mail been placed? Does Cyrus do /Maildir format, MBox, or some other, and, if more than one, at what point was it told which one... and did fetchmail (or was that Postfix) need to be told something different, depending on which format Cyrus was going to use?
cyrus stores its mail in /var/spool/imap. It doesn't use maildir, it uses its own way of storing it, you're supposed to access it through an IMAP capable email client
Step 5: configure fetchmail either manually, if you know the config file syntax, or through the fetchmailconf GUI
I'm not facing it right now, so I can't remember all the things that I had to guess what they meant in the fetchmail configuration (whether via GUI or editor).
For most configurations, all you need is the address of the remote server, the username there (and possibly what it should be changed to on the local server) and the password
My first step was usually to go to the bottom of a config file, to see what YaST might have inserted/appended, before trying to figure out what to attempt next. Of course, if the bulk of the problem was forgetting to run SuSEConfig, then I tweaked a lot of stuff that I needn't have done, out of increasing frustration.
Step 6: run fetchmail If in the config you set it up as a daemon, run it as a daemon, otherwise set up a cron job to run it at regular intervals (not sure how specific I need to be about this step)
Maybe a little more, regarding what the differences would have looked like in the fetchmail config file.
There is only one difference really, "set daemon <interval>", which tells fetchmail to not exit after it's polled the remote server, and to keep polling every <interval> seconds You can have a look at "man fetchmail" in the section "DAEMON MODE" for the details
Also, can you briefly explain the advantages of either choice?
I haven't worked enough with fetchmail to be able to say. The only crucial difference I can see is that in daemon mode, fetchmail prevents multiple instances, which might happen if you poll through cron, if the polling takes longer than the interval But as I said, I'm not experienced enough with fetchmail to give any more detailed information
Assume that if the machine is on, I want fetchmail to be checking out my ISP for new mail on my account, my wife's account, and at least one other, every ten or twenty minutes. That can be done with the daemon alive and waking itself for a mail run at the specified intervals, or with a cron job launching the executable at the interval, then killing it after it completes... each time? Why one or the other, or have I misunderstood?
I would do it as a daemon, but that's just me If you have any more followups, I'm not sure I'll have time to answer (I'm moving to Germany this weekend and I'm not sure when I'll be back online), so I hope others will pick up the thread -- 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 (3)
-
Anders Johansson
-
jdow
-
mlist@safenet-inc.com