Fetchmail > Scalix (Linux Newbie)

Discuss installation of Scalix software

Moderators: ScalixSupport, admin

tarwin
Posts: 11
Joined: Fri Oct 20, 2006 1:38 am

Fetchmail > Scalix (Linux Newbie)

Postby tarwin » Mon Oct 30, 2006 1:01 am

Hi,

After success with installation of Scalix, with wonderous help from this forum and moderators, I decided I should read the manuals / linux HOW-TOs before continueing.

I got as far as working out how to use fetchmail to download mail from external sources (http://www.scalix.com/wiki/index.php?ti ... /Fetchmail). I've got that working, using crontab nonetheless (ok, not sure if that's working exactly, but I've been using fetchmail manually anyway). Also must thank (http://www.scalix.com/community/viewtop ... 123a06e1f6) for help getting fetchmail working properly on Suse 10.1.

My problem occurs because I'm not sure how exactly to get the mail from my linux user mail to the Scalix mailbox.

For example I do the following:

fetchmail -p pop3 -S linux1 --smtpname default@linux1 -u username mail.sub.net.au

Yeah I know I should probably mask some of those details, but I ain't giving username/password, so what.

Anyway, this works fine and downloads email to "default" user on the "linux1" server (the same server that has Scalix on it). I can simply "gedit" the /var/spool/mail/default to view the contents of the emails.

How do I get scalix to get this email though? I'm trying to send all email to a public folder for some email addresses, and to specific Scalix users for others. I'm sure it will be easy using instructions at http://www.scalix.com/wiki/index.php?ti ... a_Catchall and http://www.scalix.com/wiki/index.php?ti ... ic_Folders once I understand how to just deliver the mail.

Also, does crontab work when no users are logged in? Does
Scalix? Sorry, as I said, Linux newbie).

Thank you for your help in advance.

Valerion
Scalix Star
Scalix Star
Posts: 2730
Joined: Thu Feb 26, 2004 7:40 am
Location: Johannesburg, South Africa
Contact:

Postby Valerion » Mon Oct 30, 2006 5:27 am

Mail should not be delivered to your local mailbox at all. My fetchmail is set up as follows:

In root's crontab I have

Code: Select all

*/15 * * * *    /usr/bin/fetchmail -f /etc/fetchmailrc >/dev/null 2>&1


This runs fetchmail every 15 minutes, using the config file /etc/fetchmailrc. To edit root's crontab, as root run crontab -e

In my /etc/fetchmailrc I have the following:

poll pop.my-isp.com with protocol pop3 username me@my-isp.com with password my-password is my-full-scalix-email-address here fetchall


This delivers all mail sent to my ISP account to my scalix email address on my machine. Just make sure you run omsendin if you make any changes to the sendmail configuration, otherwise it may do the delivery into your local UNIX mailbox or get a failure.

As for the logged-in question, there's daemon processes that handle cron and Scalix, and they run at startup (or should), so you don't need to be logged in.

tarwin
Posts: 11
Joined: Fri Oct 20, 2006 1:38 am

Postby tarwin » Mon Oct 30, 2006 9:42 am

Thanks for your feedback. As soon as I get back to work tomorrow, I'll give that a try. I realise that it's a little silly trying to learn Scalix at the same time as Linux, but here goes. I guess I was just waiting for the right product to really push me over to using Linux.

Now a note for others like myself.

For anyone reading this, "fetchmailrc" or ".fetchmailrc" (for root as is my understanding), are the configuration files for fetchmail.(a "run control file" I think it is called). If you check out the fetchmail man (do a search for "fetchmail man") then it might now start to make sense. The "-f" lets you specify a different "run control file" than the default. "The ‘poll’ verb tells fetchmail to query this host when it is run with no arguments." (fetchmail man) might also make sense to make your life easier.

And one more question

And another question: What exactly is the "2>&1" in your Cron? I realise that the >/dev/null makes sure cron doesn't keep needlessly emailing "root" user and instead output to the null device, but what does this "2>&1" do?

Valerion
Scalix Star
Scalix Star
Posts: 2730
Joined: Thu Feb 26, 2004 7:40 am
Location: Johannesburg, South Africa
Contact:

Postby Valerion » Mon Oct 30, 2006 11:15 am

tarwin wrote:And another question: What exactly is the "2>&1" in your Cron? I realise that the >/dev/null makes sure cron doesn't keep needlessly emailing "root" user and instead output to the null device, but what does this "2>&1" do?

That's a bit of shell black magic ;)

It takes the output of standard error and merges it into standard output. Effectively you can only discard one of the two streams, I am merging them so I can discard them together.

tarwin
Posts: 11
Joined: Fri Oct 20, 2006 1:38 am

Postby tarwin » Tue Oct 31, 2006 10:01 am

Thanks again for your help.

The suggestions worked perfectly.

At the moment I'm currently trying to get Public Folders working. At the moment the current Wiki information isn't really complete, and so I'll try to add to it when I work it out.

One question for all those Linux wonders out there, how do I forward all emails from a Linux users email box to another address ?

I've tried using fetchmail but I couldn't seem to work out how to access "local" email boxes, as it only works with pop3 or imap.

I also tried using "Mail" and "~F 1-38" (make a new message, and add messages 1 to 38 to the message) and sending it to the local email server, which worked, but it did a bit of weirdness (didn't maintain HTML parts properly, and had headers as text) and didn't attach attachments.

tarwin
Posts: 11
Joined: Fri Oct 20, 2006 1:38 am

Postby tarwin » Tue Oct 31, 2006 12:04 pm

I got the Public Folders working, with the aforementioned Wiki's help. All good. There wasn't much to it. Just create your new Folder under pubilc, then use the Wiki info to add an address for that Public Folder. The main confusion is that in the Wiki there seems to be an errant "\" which screws with the adding of address to the folder.

I then used the fetchmail info above to make an external address that could be sent to, that would be downloaded as this shared mail.

Wonderful.

Now it's only the problem that Scalix seems to be REALLY SLOW with downloading 193 message headers, not sure what that is. Maybe just the 11 Beta Web Access or something. I'll be trying Outlook Connect soon, so I'll report back to say how it works.

(I'm hopeing that some of what I write is useful to others)

PS: I thought I'd try some Linux IRC channels, to see if they could help with the problem of moving mail. Alas, the only useful response I got was from someone was trying to convince me that there was no need for Scalix, and that the same could be done in a couple of minutes by a "Linux wiz" with Squirrelmail, Postfix, TomCat etc .. suffice to say he was a NUTTER. So I'm going to stick around here for a while.


Return to “Installation”



Who is online

Users browsing this forum: No registered users and 3 guests

cron