Author Topic: Mail And Stuff  (Read 13086 times)

jochen-02

  • Newbie
  • *
  • Posts: 35
    • View Profile
Mail And Stuff
« Reply #45 on: May 24, 2006, 02:46:19 am »
Quote
I tried it. But unfortunately, procmail still wants to access /var/spool/mail/zaurus.
I have removed all access rights from /var/spool/mail/zaurus to monitor if any access is done, and it is:

Code: [Select]
reading message xyz@mail.serer.net:1 of 1 (1142 octets) .procmaiil: Renaming bogus mailbox "var/spool/mail/zaurus" info "/var/spool/mail/BOGUS.zaurus.JmB"
procmail: Couldn't create "/var/spool/mail/zaurus"
 flushed
I forgot to mention that you have to compile procmail with a changed setting for you system (mbox|mailspool). Depending on the procmail version this is done in config.h (SYSTEM_MBOX) or in authenticate.c (MAILSPOOLHOME).

You will find a description in the procmail FAQ.
--
Jochen SL-C1000 (Sharp ROM)

daniel3000

  • Hero Member
  • *****
  • Posts: 1003
    • View Profile
    • http://
Mail And Stuff
« Reply #46 on: May 24, 2006, 05:18:34 am »
Quote
I forgot to mention that you have to compile procmail with a changed setting for you system (mbox|mailspool). Depending on the procmail version this is done in config.h (SYSTEM_MBOX) or in authenticate.c (MAILSPOOLHOME).

You will find a description in the procmail FAQ.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=128273\"][{POST_SNAPBACK}][/a][/div]

Ah, so this seems to be the reason.
But now, things are getting complicated for the Zaurus. Seems I have to hardcode the spool file / directory that way. But how can I determine the best location for the spool file for all Zaurus users? Some have a hard disk with "unlimited" space, some have only enough space on a memory card...
When using /tmp for example, this is limited to 1MB on some machines. Getting an email >1MB will not work then, or would it? It depends:

I'm still not sure why procmail needs a spool directory at all, as fetchmail hands the mail directly to procmail (at least i thought so - kind of a pipe?) and procmail puts the mails into various (or one default) mbox files, located in a directory adjustable by .*rc parameters, i.e. user-controllable.
Or is the spool file in that case only opened but not written to? Then it can well be located in /tmp or in the home directory.

the MAILSPOOLHOME define in authenticate.c (procmail 3.22) is relative to the home directory, so this will not allow putting a spool file in /tmp (setting /tmp would mean ~/tmp).
I assume I'll have to modify the MAILSPOOLDIR define for that purpose?

Thanks!
daniel
SL-C3200 with weeXpc, based on pdaXrom 1.1.0beta3
HP 200LX with MS-DOS 5.0

jochen-02

  • Newbie
  • *
  • Posts: 35
    • View Profile
Mail And Stuff
« Reply #47 on: May 24, 2006, 09:30:46 am »
Quote
But now, things are getting complicated for the Zaurus. Seems I have to hardcode the spool file / directory that way. But how can I determine the best location for the spool file for all Zaurus users? Some have a hard disk with "unlimited" space, some have only enough space on a memory card...
Since procmail ist Open Source you have all you need to solve the problem the elegant way.
Quote
When using /tmp for example, this is limited to 1MB on some machines. Getting an email >1MB will not work then, or would it?
Sure it would. Procmail seems to check if the spooldir exists. Room is required for the lock file but not for the mail itself.
Quote
the MAILSPOOLHOME define in authenticate.c (procmail 3.22) is relative to the home directory, so this will not allow putting a spool file in /tmp (setting /tmp would mean ~/tmp).
I assume I'll have to modify the MAILSPOOLDIR define for that purpose?
This constant is made for configuration/modification. Something like this might help:
Code: [Select]
diff authenticate-orig.c authenticate.c
50c50
< /*#define MAILSPOOLHOME "/.mail"        /* watch the leading / */
---
> #define MAILSPOOLHOME /*"/.mail"        /* watch the leading / */
185c185,187
<    { static const char mailfile[]=MAILSPOOLHOME;size_t i;
---
> /*   { static const char mailfile[]=MAILSPOOLHOME;size_t i; */
>      { static char mailfile[]="";size_t i;
>      *mailfile=getenv("MAILSPOOL");
With this modification you should be able to set mailspool at runtime with the env var $MAILSPOOL.
--
Jochen SL-C1000 (Sharp ROM)

daniel3000

  • Hero Member
  • *****
  • Posts: 1003
    • View Profile
    • http://
Mail And Stuff
« Reply #48 on: May 24, 2006, 12:56:42 pm »
Quote
Sure it would. Procmail seems to check if the spooldir exists. Room is required for the lock file but not for the mail itself.
Quote
the MAILSPOOLHOME define in authenticate.c (procmail 3.22) is relative to the home directory, so this will not allow putting a spool file in /tmp (setting /tmp would mean ~/tmp).
I assume I'll have to modify the MAILSPOOLDIR define for that purpose?
This constant is made for configuration/modification. Something like this might help:
Code: [Select]
diff authenticate-orig.c authenticate.c
50c50
< /*#define MAILSPOOLHOME "/.mail"        /* watch the leading / */
---
> #define MAILSPOOLHOME /*"/.mail"        /* watch the leading / */
185c185,187
<    { static const char mailfile[]=MAILSPOOLHOME;size_t i;
---
> /*   { static const char mailfile[]=MAILSPOOLHOME;size_t i; */
>      { static char mailfile[]="";size_t i;
>      *mailfile=getenv("MAILSPOOL");
With this modification you should be able to set mailspool at runtime with the env var $MAILSPOOL.
[div align=\"right\"][a href=\"index.php?act=findpost&pid=128306\"][{POST_SNAPBACK}][/a][/div]

Thanks for that idea.
I have solved the problem another way, though.
#define MAILSPOOLDIR = "/tmp"
#define MAILSPOOLHOME = "/."
do the trick well.

Interestingly, MAILSPOOLHOME = "/" seems to tell procmail to use maildir format, because in that case it creates directories "cur" and "new" in home. In .procmailrc a trailing / is the sign for procmail to use maildir. So I chose "/." and this really works as I want: no maildir directories are created, no /var/spool/mail is needed.

This should work on all Zauri, except when the used partition is entirely full or readonly so that not even a lockfile can be created. This should not be the case with home, nor with /tmp.

Thanks a lot for your help!

daniel
SL-C3200 with weeXpc, based on pdaXrom 1.1.0beta3
HP 200LX with MS-DOS 5.0

jochen-02

  • Newbie
  • *
  • Posts: 35
    • View Profile
Mail And Stuff
« Reply #49 on: May 24, 2006, 02:39:16 pm »
Quote
I have solved the problem another way, though.
#define MAILSPOOLDIR = "/tmp"
#define MAILSPOOLHOME = "/."
do the trick well.
Why not combining both solutions? Take my patch (test it!) to let the user set his/her spool dir with an env var and let the default be $HOME.
--
Jochen SL-C1000 (Sharp ROM)

bam

  • Hero Member
  • *****
  • Posts: 1213
    • View Profile
    • http://thegrinder.ws
Mail And Stuff
« Reply #50 on: May 24, 2006, 02:51:50 pm »
hey anyone got gmail to actually talk? nm, I have to learn google is good not the devil, well actually it is quite evil
« Last Edit: May 24, 2006, 03:06:04 pm by bam »
SL-C3100 current: Stock/Tetsu 18h
Socket BT CF Card
Linksys WCF-12 802.11b/Cheapie USB Ethernet

The Grinder

starkruzr

  • Jr. Member
  • **
  • Posts: 62
    • View Profile
Mail And Stuff
« Reply #51 on: May 25, 2006, 12:02:50 pm »
Quote
hey anyone got gmail to actually talk? nm, I have to learn google is good not the devil, well actually it is quite evil
[div align=\"right\"][a href=\"index.php?act=findpost&pid=128325\"][{POST_SNAPBACK}][/a][/div]

Gtalk should work if you use Firefox to access the site.  It depends on a lot of funky Javascript stuff to make it work correctly.

Of course, you could always use a Jabber client like GAIM to get onto it, too
SL-C1000 Akita running OZ 3.5.4.1 with GPE
Ambicom WL1100C-CE Wifi Card
Sandisk 1GB SD Card

Looking for advice as to how to get snes9x and dgen-sdl running!

bam

  • Hero Member
  • *****
  • Posts: 1213
    • View Profile
    • http://thegrinder.ws
Mail And Stuff
« Reply #52 on: May 25, 2006, 03:13:52 pm »
actually I got pine to download with no problem, just need to solve the send-it-with who it was sent to account and it'll be complete, then I can setup some scripts to do all of this for you. Multiple accouns that is, and a basic spam filter, the rest will be up to you.
SL-C3100 current: Stock/Tetsu 18h
Socket BT CF Card
Linksys WCF-12 802.11b/Cheapie USB Ethernet

The Grinder

spanky

  • Newbie
  • *
  • Posts: 10
    • View Profile
Mail And Stuff
« Reply #53 on: July 07, 2006, 06:50:27 am »
Is there any chance this setup will work on an SL-5500 running OZ3.5.4?

spanky

  • Newbie
  • *
  • Posts: 10
    • View Profile
Mail And Stuff
« Reply #54 on: July 10, 2006, 06:18:31 pm »
Quote
Is there any chance this setup will work on an SL-5500 running OZ3.5.4?
[div align=\"right\"][{POST_SNAPBACK}][/a][/div]


well, I can answer my own question. I've got all of this running on my SL-5500, the only problem now is that when I check for new mail while online, fetchmail always downloads all mail, even mail that has already been downloaded.

I followed a lot of the info in this

[a href=\"http://www.daniel-hertrich.de/zaurus/zps/]http://www.daniel-hertrich.de/zaurus/zps/[/url]

and this

http://www.thegrinder.ws/main/node/186

and am using mutt.

Mutt is configured so that when I press Shift-G it runs muttonline.sh, which contains

#!/bin/bash

echo Sending mail...
/opt/QtPalmtop/bin/msmtp-runqueue.sh

echo Fetching new mail...
/opt/QtPalmtop/bin/fetchmail -km '/opt/QtPalmtop/bin/procmail -d %T'

Any ideas why fetchmail is always downloading all mail?

bluedevils

  • Hero Member
  • *****
  • Posts: 1284
    • View Profile
    • http://
Mail And Stuff
« Reply #55 on: July 10, 2006, 06:27:51 pm »
I haven't tried this on the Z yet, but  a -U will keep track of what is old and what is new.  Make sure you are not using the keep and fetchall options together.
I'm now an iphone user and use my zaurii as serial terminals, perl and shell scripting and when I need 640x480 screens

sl-c3100/pda cacko 1.23 | sl-6000l/needs battery | sl-c760/server pdaxrom rc12 | Former sl-5500/tkcrom owner (sister's birthday gift)

bam

  • Hero Member
  • *****
  • Posts: 1213
    • View Profile
    • http://thegrinder.ws
Mail And Stuff
« Reply #56 on: July 12, 2006, 06:40:00 am »
Quote
Quote
Is there any chance this setup will work on an SL-5500 running OZ3.5.4?
[div align=\"right\"][{POST_SNAPBACK}][/a][/div]


well, I can answer my own question. I've got all of this running on my SL-5500, the only problem now is that when I check for new mail while online, fetchmail always downloads all mail, even mail that has already been downloaded.

I followed a lot of the info in this

[a href=\"http://www.daniel-hertrich.de/zaurus/zps/]http://www.daniel-hertrich.de/zaurus/zps/[/url]

and this

http://www.thegrinder.ws/main/node/186

and am using mutt.

Mutt is configured so that when I press Shift-G it runs muttonline.sh, which contains

#!/bin/bash

echo Sending mail...
/opt/QtPalmtop/bin/msmtp-runqueue.sh

echo Fetching new mail...
/opt/QtPalmtop/bin/fetchmail -km '/opt/QtPalmtop/bin/procmail -d %T'

Any ideas why fetchmail is always downloading all mail?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=134600\"][{POST_SNAPBACK}][/a][/div]

whats your fetchmailrc look like?
SL-C3100 current: Stock/Tetsu 18h
Socket BT CF Card
Linksys WCF-12 802.11b/Cheapie USB Ethernet

The Grinder

spanky

  • Newbie
  • *
  • Posts: 10
    • View Profile
Mail And Stuff
« Reply #57 on: July 12, 2006, 02:42:15 pm »
Quote
whats your fetchmailrc look like?
[div align=\"right\"][a href=\"index.php?act=findpost&pid=134827\"][{POST_SNAPBACK}][/a][/div]

Fetchmailrc looks like this


poll my.mail.server
protocol pop3
user me@my.domain
password myPassword
is root
mda "/usr/bin/procmail -f %F"
keep

I stuffed my zaurus installation last night, so I'm going to have to reflash - will see how it all runs after that. I also tried to install offlineImap, but it wouldn't work, so I think I'll stick with the fetchmail setup for the time being.

bam

  • Hero Member
  • *****
  • Posts: 1213
    • View Profile
    • http://thegrinder.ws
Mail And Stuff
« Reply #58 on: July 12, 2006, 04:00:34 pm »
hmmmm, not sure, but I do use the flush option to get rid of "read" emails.
SL-C3100 current: Stock/Tetsu 18h
Socket BT CF Card
Linksys WCF-12 802.11b/Cheapie USB Ethernet

The Grinder