Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Email System For The Home Network - Version 2.1
View unanswered posts
View posts from last 24 hours

Goto page Previous  1, 2, 3 ... 7, 8, 9 ... 25, 26, 27  Next  
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks
View previous topic :: View next topic  
Author Message
Weejoker
n00b
n00b


Joined: 11 Sep 2002
Posts: 69
Location: Scotsman in England

PostPosted: Sat Sep 27, 2003 4:18 pm    Post subject: Reply with quote

Okay, I managed to solve the problem with the "missing secret" and numerous SSL errors in the /var/log/mail/* :)

Code:
[postfix/smtpd] < titus.localnet[192.168.0.2]: AUTH CRAM-MD5
[postfix/smtpd] smtpd_sasl_authenticate: sasl_method CRAM-MD5
...
[postfix/smtpd] > titus.localnet[192.168.0.2]: 235 Authentication successful


Here's what I changed:

    Set commonName_default in the openssl.cnf to the FQDN of the mailserver
    Code:
    commonName_default              = weejoker.localnet

    Change the /etc/sasl2/smtpd.conf and /etc/sasl2/smtpd-2.0.conf to:
    Code:
    pwcheck_method:auxprop

    When entering using the saslpasswd2 command, I set the user domain to the FQDN of the mailserver:
    Code:
    saslpasswd2 -c -u weejoker.localnet -a smtpauth test


(NOTE: The 'sasldblistusers2' command does not return any values indicating if the secret is present... only 'sasldblistusers' does this - you have to check in /var/log/mail/* to see if postfix can find the secret. The pwcheck_method of 'auxprop' also supercedes 'sasldb' in Cyrus-SASL-2.*. )

I don't know which one caused it to work, but I'm not going back to find out as it's working perfectly! :twisted:

John
Back to top
View user's profile Send private message
dstutz97
Tux's lil' helper
Tux's lil' helper


Joined: 14 Apr 2003
Posts: 80

PostPosted: Sun Sep 28, 2003 1:35 am    Post subject: Mozilla 1.4 (Win32) and up needed for PAM/CRAM-MD5 smtp auth Reply with quote

If anyone cares....I just found out tonight that Mozilla builds for windows <1.4 do not support CRAM-MD5 authentication. I had a user that had 1.3 and he was just getting a straight reject message and nothing about sasl or smtp auth showed up in the logs. I upgraded him to 1.5-rc2 and it works great now. I also tried on another user's 1.4 and it works fine as well.

Weejoker: commonName_default is for a person's name, not the hostname of a machine.
I would assume in your case that
Quote:
When entering using the saslpasswd2 command, I set the user domain to the FQDN of the mailserver:
helped you get it working. But, since I am by no means the expert on this...I'll just leave it at an assumption.
Back to top
View user's profile Send private message
Weejoker
n00b
n00b


Joined: 11 Sep 2002
Posts: 69
Location: Scotsman in England

PostPosted: Sun Sep 28, 2003 12:45 pm    Post subject: Reply with quote

Quote:
Weejoker: commonName_default is for a person's name, not the hostname of a machine.


On my own experience with SSL & Apache 1.x.x servers, I had to set the commonName to the FQDN due to technical issues. The UNIX guru's at my place of work and the Apache documentation said this too at the time (www.snakeoil.com was the example I think). I don't know if this applicable to SMTP servers though, so I could be hopelessly wrong. :)

I'll try to verify each of my three "fixes" later however. and see what one made the difference. :)

John
Back to top
View user's profile Send private message
Weejoker
n00b
n00b


Joined: 11 Sep 2002
Posts: 69
Location: Scotsman in England

PostPosted: Sun Sep 28, 2003 1:17 pm    Post subject: Reply with quote

I can confirm that setting the realm/domain in saslpasswd2 to the FQDN of the server was the solution to the "missing secret" and SSL problems. Thanks to dstutz97 for helping me clarify this. :D

(I set the openssl.cnf commonName to a random word and regenerated the *pem's and then set /etc/sasl/smtp*.conf to "sasldb" for pwcheck_method, to ensure the above was the correct solution.)

Could someone please add this to the guide (as an alternative)?

John
Back to top
View user's profile Send private message
bernd
Tux's lil' helper
Tux's lil' helper


Joined: 16 Aug 2002
Posts: 126
Location: Wilhelmshaven/Germany

PostPosted: Sun Sep 28, 2003 9:48 pm    Post subject: Reply with quote

hi,

i have a problem to connect to my smtp server via tls. these is what /var/log/mail.info says

TLS connection established from neo.bernd.bounceme.net[192.168.0.2]: TLSv1 wi$
Sep 28 23:39:31 morpheus postfix/smtpd[2192]: warning: SASL authentication failure: no secret in database
Sep 28 23:39:31 morpheus postfix/smtpd[2192]: warning: neo.bernd.bounceme.net[192.168.0.2]: SASL DIGEST-MD5 authentication $
Sep 28 23:39:32 morpheus postfix/smtpd[2192]: disconnect from neo.bernd.bounceme.net[192.168.0.2]

i set up the database as descripted in 3.2 of the howto (i followed it as it is discrpted). but i can`t connect via tls.

there is one liddle difference
/usr/sbin/sasldblistusers2 show in the guide

root@server # /usr/sbin/sasldblistusers
beowulf@beowulf.bounceme.net: cmusaslsecretOTP
beowulf@beowulf.bounceme.net: userPassword

in my case it is
morpheus root # sasldblistusers2
bernd@bernd.bounceme.net: userPassword

so there is cmusaslsecretOTP missing.

Can anybody help me??

(!!Sorry for my bad English!!)

Bernd
Back to top
View user's profile Send private message
dstutz97
Tux's lil' helper
Tux's lil' helper


Joined: 14 Apr 2003
Posts: 80

PostPosted: Mon Sep 29, 2003 11:46 am    Post subject: Reply with quote

You are having the same problem a lot of others and myself were having. I worked around it by using PAM(CRAM-MD5) as the sasl authentication method and not sasldb(PLAIN). Obviously you need to have PAM support compiled in. I did so much trying to get it work I'm not sure if anything else would have to get modified but that setting, but the two guides I was working off of were both trying to accomplish the same thing, using sasldb. I never found out why the secret wasn't getting generated and Beowulf hasn't been back to comment yet.
Code:
root@erma dstutz # cat /etc/sasl2/smtpd.conf
pwcheck_method: PAM
mech_list: CRAM-MD5

pwcheck_method is just changed from sasldb to PAM and the mech_list limits the possible authentication methods to just PAM/CRAM-MD5. You don't need the mech_list option, I just used it cause none of the other methods work for me so why even allow them. Here's my EHLO output:
Code:
250-PIPELINING
250-SIZE 10240000
250-ETRN
250-AUTH CRAM-MD5
250-AUTH=CRAM-MD5
250 8BITMIME

NOTE: You'll notice the VRFY command is missing from what you'll probably see yourself. I turned it off for security reasons. If you want to it's easy, just put disable_vrfy_command = yes into your main.cf for postfix and run postfix reload.

As I said...at this point I'm not sure if all you need to try is just switching the pwcheck_method, but I wouldn't mind knowing if following Beowulf's directions except for this setting will work. I worked on getting this functioning correctly so much I don't know how to do it from scratch and arrive where I am now cleanly.

Good Luck
Dave
Back to top
View user's profile Send private message
huhny
n00b
n00b


Joined: 01 Mar 2003
Posts: 39

PostPosted: Wed Oct 01, 2003 4:04 pm    Post subject: Reply with quote

Hi!

Great work!

When I start the courier-imapd-ssl deamon I get this error:

Code:

root@mrsaug / # /etc/init.d/courier-imapd-ssl start
 * Starting authdaemond.plain...
/usr/lib/courier-imap/authlib/authdaemond.plain: line 1: syntax error near unexpected token `entry,'
/usr/lib/courier-imap/authlib/authdaemond.plain: line 1: `fields_cmp(entry, dict_index_get_n_unique(index));'          [ !! ]
 * ERROR:  Problem starting needed services.
 *         "courier-imapd-ssl" was not started.


What's wrong? I can't find my mistake?

Thx for help!

Bye,
Huhny
_________________
Registered Linux user #239959
:arrow: Mein Weblog
Back to top
View user's profile Send private message
beowulf
Apprentice
Apprentice


Joined: 07 Apr 2003
Posts: 225

PostPosted: Mon Oct 06, 2003 6:00 pm    Post subject: Reply with quote

Email System For The Home Network
For Gentoo Linux
Beowulf <beowulf_agate AT imap DOT cc>

Version 2.1 - Fixed an error that resulted in sasl using sasldb, added link to AV solution.
Version 2.0 - Complete Rewrite to ease SSL, SASL, OE and general setup time.
Version 1.5 - Added Outlook Express 6, updated Apache/PHP setup to Apache2, small fixes.
Version 1.4 - software version updates, misc enhancements/clarifications. Added Troubleshooting section.
Version 1.3 - Typo corrections, Added Spam Solutions thanks to (puddpunk,proteus)
Version 1.2 - Fixed some errors, re-wrote some sentances for clarity. Added Squirrelmail
Version 1.1 - Fixed a number of errors. Added pam config for courier-imap
Version 1.0 - Initial guide.

-----------------------------------------------------------

I've hit the maximum allowed characters in the mysql database per post. This is the continuation of the front page:

https://forums.gentoo.org/viewtopic.php?t=56633

-----------------------------------------------------------

11. Troubleshooting

So something went wrong.... Can't figure out what it is? This section will increase as problems arise with the new version2 of this guide.

11.1 Version?

As I have learned from the beginning of this guide, software updates can make a guide worthless. You'll notice in section 1.3 I list the software versions I have tested this set up on. When software updates, it causes problems. One such problem was SASL which changed the way the CMUSecret worked. In short, check and see if a different version of software is the reason why something isn't working

11.2 Hostname Problems:

It seems different software reads the hostname from different places. Please make sure that your /etc/hosts file is up to date and holds the appropriate lines. Here's mine for comparison:
Code:

root@server # cat /etc/hosts
127.0.0.1       localhost
192.168.2.2     Chimera.apparition.ath.cx               Chimera
192.168.2.3     Illusion.apparition.ath.cx              Illusion

Another possibility is to check these files:
Code:

root@server # cat /etc/hostname && cat /etc/dnsdomainname && cat /etc/nisdomainname

root@server # rc-update add domainname default
root@server # /etc/init.d/domainname start

We've started a service that will set your domainname based on what is held in those three files. You can test what your FQDN is by entering this command:
Code:
hostname -f


11.3 Checking Your Logs:

Most logging facilities offered by Gentoo log by default all mail error/info/warnings. If not, read up on how to set it up so it does as the logging is priceless. I recommend reading the Gentoo Security Guide found by clicking here

11.4 Restarting Servers:

Although it may seem obvious, occassionaly people do forget to restart their servers after making changes. Not only that, but occasionally a restart isn't enough and you must action stop the server, then start it over again. I ran into problems using the command "# postfix reload" where it would not re-read my config file changes. I had to stop the server, then restart it. Weird eh?

11.5 Re-checking Config Files:

Occassionaly after looking at a very large page of text, your eyes jump lines, occassionaly reading the same line more than once.... or is that just me? In any case, I've tried to make the config file setups as detailed as possible. If nothing is working, and you can't figure it out, double check your config files, see if they match mine, and where they differ, it should only be for personal reasons (IE: network, username/pass, etc).

11.6 Folders Not Showing Up In Email Client:

One problem that may exist is your subfolders which you have redirected email to using procmail are not showing up in your email client. One option to look for is to subscribe to all folders. Many email clients, even SquirrelMail require the user to specify which subfolders to subscribe to before they show the email there. Also, keep in mind that the subfolders will be created by procmail when email arrives. There's no need to maildirmake any directories aside from the main one (~/.maildir).

Another place to look is the file ~/.maildir/courierimapsubscribed. If you open this file in a text editor you'll notice it has a list of your subsribed folders. Simply add any folders you want in this file. One such example:
Code:

user@server $ vi ~/.maildir/courierimapsubscribed

INBOX.gentoo
INBOX.gentoo-gwn
INBOX.gentoo-announce

Normally your email client will take care of this, but this is another place to look for errors. Simply restart your courier-imapd-ssl server after editing this file and you're set. Thanks to Fragbeestje for bringing this to our attention.

11.7 Can't Connect To Server:

There may be a number of reasons why your email client cannot connect to your server's SMTP or IMAP server. Make sure you've opened the necessary ports in your firewall (25 for SMTP and 993 for Imaps). Also, check if you have a ALL:PARANOID in your /etc/hosts.deny. Another place to look is if you're using (x)inetd. If all this fails, netstat -a will show whether or not your server is listening to ports or not. If it isn't, you may have more serious problems than the server not listening, but rather a socket error.

11.8 Outlook Spitting Out Errors:

Outlook is fickle for lack of a better word. I have it working fine, and I'm confident that the setup I have described will work for you. However, I have been proven wrong on more than one occassion. One reason OE spits out errors is because of Norton Anti-Virus outbound email scanning. If you are having problems sending email, either not connecting or errors in your logs, try disabling outbound scanning. It's a known problem that can be researched on Google.

12. Resources

I used many resources found from all over the net in my attempts to create this system. Hopefully i have left nothing out and perhaps these links can serve as a starting point for your email endeavours.

12.1 Acknowledgements

A special thanks to both Proteus and puddpunk for allowing me to present their work on the front page of this thread. Their Spam solutions has helped flesh out this guide in becoming a single complete setup in a home email system. I tip my hat to you guys :)

My thanks to many people for their guides as I have used there knowledge in assembling this one. With help from the manual pages, the people replying in this thread (too many to list) and these resources:


Errors? Suggestions? Improvements? Additions? Let me know about them!

Hope this helps!
_________________
I have nothing witty to say here... ever :-(


Last edited by beowulf on Thu Feb 12, 2004 11:05 pm; edited 3 times in total
Back to top
View user's profile Send private message
beowulf
Apprentice
Apprentice


Joined: 07 Apr 2003
Posts: 225

PostPosted: Mon Oct 06, 2003 6:12 pm    Post subject: Reply with quote

glamdringlfo: Thanks for the suggestions! I hope the changes I made in this latest version has cut down on some of the confusion....

dagarath: I've been working through the guide and doing the rewrite stuff you suggested. I agree, it is a great tip, thanks! In the next version I'll have this added

Thanks Weejoker for the information regarding sasl's secret pass....

huhny: I guess the immediate question is have you tried re-compiling courier-imap? I've never seen that error before....

---

About Outlook (and Express) - There is a problem it would seem, but I don't have a windows box to figure out why it isn't working.... MS and their MS-Standards is my guess.... I'll work on it and you can expect the next guide update to include the Outlook/Express setup guide... while I'm there I might also test Eudora... do window's users still use it? hehe

I'll be working on the guide somemore, there's still the rewrite section that needs to be added, as well as outlook...

Again, any more suggestions, just send 'em to me... i'm all for them... :)

Sorry for neglecting this post for so long....
_________________
I have nothing witty to say here... ever :-(
Back to top
View user's profile Send private message
Proteus
Guru
Guru


Joined: 14 Jul 2002
Posts: 346
Location: Hamburg, Germany

PostPosted: Fri Oct 10, 2003 6:56 am    Post subject: Damn new versions... Reply with quote

Ok... Suddenly problems appeared (I blame them on the new versions).
Imap access is fine but I cannot send mails (log into the smtp/postfix server).

This is from my /var/log/mail:

Quote:
Oct 10 09:00:40 [postfix/smtpd] TLS connection established from unknown[192.168.0.2]: TLSv1 with cipher RC4-MD5 (128/128 bits)
Oct 10 09:00:41 [postfix/smtpd] warning: SASL authentication problem: unable to open Berkeley db /etc/sasl2/sasldb2: Permissi$
Oct 10 09:00:41 [postfix/smtpd] warning: SASL authentication failure: no secret in database
Oct 14 12:16:38 [postfix/qmgr] AAA26201614: to=<email@adress.de>, relay=none, delay=88286, status=deferred (unknown mail transport error)


Does anyone know why this happens? I know I changed the sasldb2 permissions as described in the guide and created a user along with a password :(

Also this is a problem with Kmail as well as with Outlook Express.

I also find the following error messages in /var/log/mail/current:
Quote:
Oct 14 14:16:37 [postfix/smtp] warning: database /etc/postfix/saslpass.db is older than source file /etc/postfix/saslpass
Oct 14 14:16:37 [postfix/smtp] fatal: unknown service: smtp/tcp
Oct 14 12:16:38 [postfix/qmgr] warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description
Oct 14 14:16:38 [postfix/master] warning: process /usr/lib/postfix/smtp pid 1628 exit status 1
Oct 14 14:16:38 [postfix/master] warning: /usr/lib/postfix/smtp: bad command startup -- throttling

All these are new to me, too....
_________________
Greetings,
Proteus
Back to top
View user's profile Send private message
startaq
n00b
n00b


Joined: 16 Oct 2003
Posts: 21

PostPosted: Fri Oct 17, 2003 12:13 am    Post subject: Reply with quote

Works fine so far, but I get the following error when i try to send mail with Sylpheed-Claw:

ESMTP< 250-PIPELINING
ESMTP< 250-SIZE 10240000
ESMTP< 250-VRFY
ESMTP< 250-ETRN
ESMTP< 250-XVERP
ESMTP< 250-8BITMIME
** SMTP AUTH not available
SMTP> MAIL FROM: <someone@mail.com>
SMTP< 250 Ok
SMTP> RCPT TO: <someone@mail.com>
SMTP< 554 <localhost[127.0.0.1]>: Client host rejected: Access denied
** Error in SMTP session

Sending mail with SquirrelMail works without problems.

EDIT: Sending mail works when i add "permit_mynetwork" to the postfix main.cf, so it must be a problem related to sasl.
Back to top
View user's profile Send private message
ba747heavy
Apprentice
Apprentice


Joined: 11 Aug 2003
Posts: 216
Location: New Mexico, USA

PostPosted: Fri Oct 17, 2003 11:05 pm    Post subject: Reply with quote

Two things:

First, I have a question about bogomail. After the bogomail script indexes all of the emails, and the spam dirs, is it ok to delete all of the .spam dir messages?

And, I was having a problem with the bogomail script fscking up on the imapcourierkeyworks directory, so I modified this portion of the code to fix it:

Code:
try:
       for dir in maildirs:
               print "Regestering ham messages from", dir
               hamlist = os.listdir(os.path.join(dir,"cur"))
               for ham in hamlist:
                  hampath = os.path.join(dir,"cur",ham)
                  print "- ", hampath
                   os.system("bogofilter -n < " + hampath)
      except (RuntimeError, TypeError, NameError, OSError):
      print "Caught the booger"


I don't know if anyone else is having that problem(exits with an Error code 2, and OSError), so that fixes it :D
_________________
Fred Clausen
"leet [speak] is a cry for help from a shallow mind" - Doomwookie Jan 05
Back to top
View user's profile Send private message
at6
Tux's lil' helper
Tux's lil' helper


Joined: 28 Nov 2002
Posts: 78
Location: /dev/null

PostPosted: Sat Oct 18, 2003 4:31 pm    Post subject: Reply with quote

hey beowulf,

thanks a lot for this wonderul tutorial. now imap works perfectly together with postfix and squirrelmail.

so keep on documenting :D

bye marc
_________________
debian: stable but lame! suse: unstable and lame! gentoo: stable and only 4 geeks!
Gadget tests!
Back to top
View user's profile Send private message
Proteus
Guru
Guru


Joined: 14 Jul 2002
Posts: 346
Location: Hamburg, Germany

PostPosted: Sun Oct 19, 2003 5:11 pm    Post subject: Reply with quote

@ba747heavy:

Yes, AFAIK the spam messages are no longer neccessary when they have been indexed. They are only needed to build up a database with certain "spam-structures" and "spam-words". You can therefore delete them safely.
_________________
Greetings,
Proteus
Back to top
View user's profile Send private message
bruor
Apprentice
Apprentice


Joined: 08 Jul 2003
Posts: 239

PostPosted: Mon Oct 20, 2003 6:04 pm    Post subject: Reply with quote

ive followed this guide to a T and its great... i can send mail locally and all works well... however, i can only send mail to the outside world i cannot receive it ... heres where i think the problem exists

in .fetchmailrc
Code:
set postmaster "bruor"
poll pop.cogeco.ca with proto pop3 auth password user "bruor" there with
password "password" is bruor here options warnings 3600


then when i try to run:
Code:
bruor@tivolinuxserver bruor $ /usr/bin/fetchmail -a -m "/usr/bin/procmail -d \%T"
1 message for bruor at pop.cogeco.ca (882 octets).
reading message bruor@pop.cogeco.ca:1 of 1 (882 octets) sh: -c: line 1: unexpected EOF while looking for matching `''
sh: -c: line 2: syntax error: unexpected end of file
fetchmail: SIGPIPE thrown from an MDA or a stream socket error
fetchmail: socket error while fetching from pop.cogeco.ca
fetchmail: Query status=2 (SOCKET)


of course the password is my real email acct password while bruor is a user on the box that i would like all my email to be pulled in under...

thats only half of teh problem... im pretty sure the other half of it is becasue cogeco is blocking inbound smtp but though i can send out from bruor@techgeeks.no-ip.org if i reply to the address i get no errors and also no email... could they be bit bucketing it?

thanks in advance for any help
Back to top
View user's profile Send private message
cripwalk
n00b
n00b


Joined: 13 Jul 2003
Posts: 59
Location: Socal

PostPosted: Thu Oct 23, 2003 6:11 pm    Post subject: Reply with quote

Thanks for the guide. Before I attempt to tackle this I just had a quick question.

In section 3.2 You said
Code:

root@server # vi /etc/postfix/saslpass

smtp.isp.com            beo739:rsmtp-pass


My ISP's smtp server does not use authentication or ssl. Since I have no username or pass would i want to do something like this?:
Code:

root@server # vi /etc/postfix/saslpass

smtp.isp.com            :


Or would I not want to use sasl at all for this step, and if not any ideas?

thanks in advance
Back to top
View user's profile Send private message
beowulf
Apprentice
Apprentice


Joined: 07 Apr 2003
Posts: 225

PostPosted: Sun Oct 26, 2003 5:46 pm    Post subject: Reply with quote

Proteus: I would check what you have set for your hostname and domain for that server, assuming you entered a fqdn in section 3.3 of the sasl user set up. If however the problem is still there, let me know and I'll try to figure out what's going on...

startaq: Yes, it's definately a sasl issue with authenticating against the sasldb. Did section 3.3 of the guide insert a sasl secret? Did the logs complain about the lack of such a secret or db error as seen in Proteus' log snippet? In any case, with the permit_mynetworks flag set, you won't need to authenticate to your smtp server. If you have mynetworks set to an internal IP range you'll be fine though.

ba747heavy: Hmm... to tell you the truth, i don't fully understand the bogofilter script myself.... i'd contact puddpunk for help on that one.....

bruror: Try running the command without the backslash. The backslash was added in to help prevent cron from choking on the line.... It still does and i've offered an alternative in the guide....

Try this command:
/usr/bin/fetchmail -a -m "/usr/bin/procmail -d %T"

cripwalk: Hmm, unfortunately I can't test that setup.... i have no idea how sasl will react with such a setup. That said, I do know postfix has a feature that will allow you to relay to another smtp server without authentication. Sasl was brought in because postfix can't relay to a smtp server that requires authentication. I would check the examples in /etc/postfix/examples/ for more information on relaying. Again, I can't test this with you, so you'll have to forgive my answer lacking any useful help....
_________________
I have nothing witty to say here... ever :-(
Back to top
View user's profile Send private message
marienZ
Retired Dev
Retired Dev


Joined: 02 Jul 2003
Posts: 30
Location: the Netherlands

PostPosted: Mon Oct 27, 2003 2:37 pm    Post subject: Reply with quote

cripwalk wrote:

My ISP's smtp server does not use authentication or ssl.


Same here. I just left out the sasl bits for sending mail, and it seems to work so far. I've also added
Code:

relayhost = mail.my-isp.com

Without this line postfix contacts the destination server directly, instead of relaying through my isp's mailserver. I hope relaying through my isp will cause my mails to not be considered spam.

Now I just have two more things to figure out: why I can't log in to squrrelmail (most likely a typo somewhere), and if it is possible to use an encrypted connection to my isp's smtp server even though I don't have to login (so my mails don't go from here to the isp in cleartext)

[edit: squirrelmail works. One thing to go.]

I've also found another little program which integrates nicely with this setup: gotmail. Gotmail is basically fetchmail for hotmail accounts. To use it, emerge gotmail, then edit as non-root:

~/.gotmailrc
Code:

# gotmailrc: settings for gotmail

username=myhotmailaccountname
password=mypassword
domain=hotmail.com

# only download mail labeled "new" on the hotmail server
only-new
# use procmail to deliver to the right mailbox
use-procmail
# max. number of retries when fetching a message fails
retry-limit=3
# don't output every action
silent
# delete messages after downloading them
# this only deletes messages downloaded by gotmail, not others
# that are on the server
delete


Then add a recipe like this to your ~/.gotmailrc if you like:

Code:

:0:
* ^X-gotmail-user: \/.*
.IN-hotmail-$MATCH/


This puts all mail sent to myaccount@hotmail.com in local mailbox IN-hotmail-myaccount. Might be useful if you use gotmail on more than one hotmail account.

To test if it all works, just run gotmail from the command line:
Code:

$ gotmail


Finally, automate it by putting something like this in your crontab:
Code:

*/5 * * * * gotmail

to run gotmail every 5 minutes.

Perhaps this is useful to someone ;)
Back to top
View user's profile Send private message
Proteus
Guru
Guru


Joined: 14 Jul 2002
Posts: 346
Location: Hamburg, Germany

PostPosted: Thu Oct 30, 2003 7:36 pm    Post subject: Reply with quote

Ok beowulf, I tried it again from the first step on, including re-emerging. Now it still does not work. I have used the FQDN of this computer (helios.liquid.net). This is my log again:

Quote:
Oct 30 20:13:39 [postfix/postfix-script] starting the Postfix mail system
Oct 30 20:13:39 [postfix/master] daemon started -- version 2.0.16
Oct 30 20:13:39 [postfix/qmgr] CC460201540: from=<>, size=2969, nrcpt=1 (queue active)
Oct 30 20:13:39 [postfix/qmgr] CE270201541: from=<>, size=2969, nrcpt=1 (queue active)
Oct 30 20:13:39 [postfix/qmgr] 95AA4201547: from=<>, size=2970, nrcpt=1 (queue active)
Oct 30 20:13:39 [postfix/qmgr] B2214201548: from=<>, size=2827, nrcpt=1 (queue active)
Oct 30 20:13:39 [postfix/qmgr] B5A3220156B: from=<>, size=2826, nrcpt=1 (queue active)
Oct 30 20:13:39 [postfix/qmgr] 52E96201543: from=<>, size=2969, nrcpt=1 (queue active)
Oct 30 20:13:39 [postfix/qmgr] D07EA2011E3: from=<>, size=2832, nrcpt=1 (queue active)
Oct 30 20:13:39 [postfix/qmgr] 311FB201542: from=<>, size=2969, nrcpt=1 (queue active)
Oct 30 20:13:39 [postfix/smtp] fatal: unknown service: smtp/tcp
- Last output repeated 4 times -

Oct 30 20:13:40 [postfix/qmgr] warning: premature end-of-input on private/smtp socket while reading input attribute name
Oct 30 20:13:40 [postfix/qmgr] warning: private/smtp socket: malformed response
Oct 30 20:13:40 [postfix/qmgr] warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description
Oct 30 20:13:40 [postfix/master] warning: process /usr/lib/postfix/smtp pid 19251 exit status 1
Oct 30 20:13:40 [postfix/master] warning: /usr/lib/postfix/smtp: bad command startup -- throttling
Oct 30 20:13:40 [postfix/master] warning: process /usr/lib/postfix/smtp pid 19252 exit status 1
Oct 30 20:13:40 [postfix/master] warning: process /usr/lib/postfix/smtp pid 19253 exit status 1
Oct 30 20:13:40 [postfix/master] warning: process /usr/lib/postfix/smtp pid 19254 exit status 1
Oct 30 20:13:40 [postfix/master] warning: process /usr/lib/postfix/smtp pid 19255 exit status 1
Oct 30 20:13:40 [postfix/qmgr] 311FB201542: to=<mail@adress.de>, relay=none, delay=957467, status=deferred (unknown mail transport error)
Oct 30 20:13:40 [postfix/qmgr] 311FB201542: from=<>, status=expired, returned to sender
Oct 30 20:13:40 [postfix/qmgr] D07EA2011E3: to=<mail@adress.de>, relay=none, delay=1116641, status=deferred (unknown mail transport error)
Oct 30 20:13:40 [postfix/qmgr] D07EA2011E3: from=<>, status=expired, returned to sender
Oct 30 20:13:40 [postfix/qmgr] 52E96201543: to=<mail@adress.de>, relay=none, delay=957467, status=deferred (unknown mail transport error)
Oct 30 20:13:40 [postfix/qmgr] 52E96201543: from=<>, status=expired, returned to sender
Oct 30 20:13:40 [postfix/qmgr] CC460201540: from=<>, status=expired, returned to sender
Oct 30 20:13:40 [postfix/qmgr] warning: premature end-of-input on private/smtp socket while reading input attribute name
Oct 30 20:13:40 [postfix/qmgr] warning: private/smtp socket: malformed response
Oct 30 20:13:40 [postfix/qmgr] warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description
Oct 30 20:13:40 [postfix/qmgr] CE270201541: from=<>, status=expired, returned to sender
Oct 30 20:13:40 [postfix/qmgr] warning: premature end-of-input on private/smtp socket while reading input attribute name
Oct 30 20:13:40 [postfix/qmgr] warning: private/smtp socket: malformed response
Oct 30 20:13:40 [postfix/qmgr] warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description
Oct 30 20:13:40 [postfix/qmgr] 95AA4201547: from=<>, status=expired, returned to sender
Oct 30 20:13:40 [postfix/qmgr] warning: premature end-of-input on private/smtp socket while reading input attribute name
Oct 30 20:13:40 [postfix/qmgr] warning: private/smtp socket: malformed response
Oct 30 20:13:40 [postfix/qmgr] warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description
Oct 30 20:13:40 [postfix/qmgr] B2214201548: from=<>, status=expired, returned to sender
Oct 30 20:13:40 [postfix/qmgr] warning: premature end-of-input on private/smtp socket while reading input attribute name
Oct 30 20:13:40 [postfix/qmgr] warning: private/smtp socket: malformed response
Oct 30 20:13:40 [postfix/qmgr] warning: transport smtp failure -- see a previous warning/fatal/panic logfile record for the problem description
Oct 30 20:13:40 [postfix/qmgr] B5A3220156B: from=<>, status=expired, returned to sender


mail@adress.de is the masked address to which I wanted to send an email to.
The bolded line is something I find very suspicious but don't know how to interpret or solve.

I am slowly getting desperate. Please help. :cry:

Here are the versions of the programs I am using, maybe you could compare yours with mine. Maybe we find a show-stopper:
Quote:
USE="ssl pam nls maildir sasl gdbm berkdb -mysql -ldap -mbox -postgres -kerberos -java -static" emerge courier-imap cyrus-sasl fetchmail postfix procmail -pv

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild R ] net-mail/courier-imap [2.1.2-r1] +gdbm -ldap +berkdb -mysql +pam +nls -postgres -fam
[ebuild R ] dev-libs/cyrus-sasl [2.1.15] +gdbm +berkdb -ldap -mysql -kerberos -static +ssl -java +pam
[ebuild R ] net-mail/fetchmail [6.2.5] +ssl +nls -ipv6 -kerberos -krb4
[ebuild R ] net-mail/postfix [2.0.16-r1] -ipv6 +pam -ldap -mysql -postgres +ssl +sasl +maildir -mbox
[ebuild R ] net-mail/procmail [3.22-r6]

_________________
Greetings,
Proteus
Back to top
View user's profile Send private message
beowulf
Apprentice
Apprentice


Joined: 07 Apr 2003
Posts: 225

PostPosted: Fri Oct 31, 2003 4:06 am    Post subject: Reply with quote

marienZ:

Glad to here most of it's working.... to use an encrypted connection to your ISP's SMTP server, assuming they support it, I think you need to edit /etc/postfix/master.cf and uncomment the smtps line so that it reads similar to this:

smtps inet n - n - - smtpd
-o smtpd_tls_wrappermode=yes -o smtpd_sasl_auth_enable=yes

As far as I can see, this would be a good place to start.... however, I can't test it so this is just a guess.... take it for what it's worth...

Proteus:

Hey, you're running unstable i think? My software appears to be a few revisions behind yours....
Code:

USE="ssl pam nls maildir sasl gdbm berkdb -mysql -ldap -mbox -postgres -kerberos -java -static" emerge courier-imap cyrus-sasl fetchmail postfix procmail -pv

These are the packages that I would merge, in order:

Calculating dependencies ...done!
[ebuild   R   ] net-mail/courier-imap-1.7.3-r1  -ipv6 +gdbm -ldap +berkdb -mysql +pam +nls -postgres
[ebuild   R   ] dev-libs/cyrus-sasl-2.1.14  +gdbm +berkdb -ldap -mysql -kerberos -static +ssl -java +pam
[ebuild   R   ] net-mail/fetchmail-6.2.3  +ssl +nls -ipv6
[ebuild   R   ] net-mail/postfix-2.0.11  +ssl -mysql +sasl -ldap -ipv6 +maildir -mbox
[ebuild   R   ] net-mail/procmail-3.22-r6

I checked a few changelogs but couldn't see anything that may have caused the problems.....

A few things that have come to mind:
Code:

# netstat -lp | grep :smtp

tcp        0      0 Chimera.beowulf.bounceme.net:smtp *:*                     LISTEN      11655/master
tcp        0      0 localhost:smtp          *:*                     LISTEN      11655/master

If you don't have two lines there (only the localhost:smtp line is there), something is wrong with your FQDN and it's not being recognized by postifx. If this is the case, I'd try explicitly telling postfix what your fqdn is...

Another place to check would be /etc/postfix/master.cf as that controls the actual postfix daemon.
_________________
I have nothing witty to say here... ever :-(
Back to top
View user's profile Send private message
Proteus
Guru
Guru


Joined: 14 Jul 2002
Posts: 346
Location: Hamburg, Germany

PostPosted: Sat Nov 01, 2003 9:19 am    Post subject: Reply with quote

Beowulf: Yes, I was running stable and when it didn't work I tried switching to unstable but with the same results. I am currently emerging back a stable system again. Will try again with setting the FQDN manually when that's done.

The other question is: Why should/could postfix have problems with my FQDN - I have set it as described in the Gentoo install docs and it is shown correctly everywhere as far as I can see....
_________________
Greetings,
Proteus
Back to top
View user's profile Send private message
beowulf
Apprentice
Apprentice


Joined: 07 Apr 2003
Posts: 225

PostPosted: Sun Nov 02, 2003 4:50 am    Post subject: Reply with quote

Not sure why.... But from what I understood (albeit very little) from your logs you have a network problem. Postfix is having trouble with the sockets... so it was only the first thing that popped in my head....

Also, I just seen your mysql socket problem.... i wonder if these two things are related to a more serious matter than just daemon's not working?

Hopefully everything works after you re-emerge your system....
_________________
I have nothing witty to say here... ever :-(
Back to top
View user's profile Send private message
Proteus
Guru
Guru


Joined: 14 Jul 2002
Posts: 346
Location: Hamburg, Germany

PostPosted: Sun Nov 02, 2003 6:16 pm    Post subject: Reply with quote

I thought about a connection between my mysql installation failing and postfix not being able to run, too. However, no one seems to know what the problem really is or how to fix it.
It seems I am always experiencing the problems no one else has... :(
_________________
Greetings,
Proteus
Back to top
View user's profile Send private message
Proteus
Guru
Guru


Joined: 14 Jul 2002
Posts: 346
Location: Hamburg, Germany

PostPosted: Mon Nov 03, 2003 8:27 pm    Post subject: Reply with quote

!EDIT!
It is still not working. (I thought it was and posted it here.) I was tired last night and tested it from my notebook - but is configured to send mail directly through my isp. When I try it using my own "mail server" it still gives the same errors as before. This is what I have done in the meantime:

I emerged back to stable and "hardcoded" my FQDN into main.cf.

There might be some error either in my gentoo system or in this guide:
In stage 2.1 is this:
Quote:
root@server # vi /etc/dnsdomainname

beowulf.bounceme.net

root@server # vi /etc/hostname

Chimera

root@server # hostname Chimera.beowulf.bounceme.net


However when I repeat those steps (using cat instead of an editor to better show the results) I get this:
Quote:
helios / # cat /etc/dnsdomainname
liquid.net
helios / # cat /etc/hostname
helios
helios / # hostname
helios


So actually my system seems to think its FQDN is just "helios" instead of "helios.liquid.net. This seems to have something to do with a change to baselayout that is long history now. Before that change (in 1.4rcx times) I think the FQDN was configured completely in /etc/hostname, today it is split into 2 files. /etc/dnsdomainname and /etc/hostname, each containing just a part of the FQDN.

Have I done something wrong while installing? (I checked the installation instructions but noticed nothing wrong.) Do I have to live with hardcoding the FQDN in main.cf? Is something wrong with the current baselayout? Any hints are greatly apprechiated.

(I know that the example in this guide uses "hostname" to actually set the hostname rather than just show it. However, that change is not permanent this way. And I think that it is described a bit irritating, I think beowulf just wanted to show the output of "hostname", not set it. In that case there is a missing End-of-Line in that example.
As always, correct me if I am wrong.)
_________________
Greetings,
Proteus
Back to top
View user's profile Send private message
Proteus
Guru
Guru


Joined: 14 Jul 2002
Posts: 346
Location: Hamburg, Germany

PostPosted: Tue Nov 04, 2003 2:06 pm    Post subject: Reply with quote

Ok, I just keep posting what I am doing :

I completely cleaned my system from everything postfix related and started from scratch, then re-emerged postfix and configured it.
It seems to be able to run now (socket problem seems to be solved).

Quote:
netstat -al
Active Internet connections (servers and established)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 0 *:imaps *:* LISTEN
tcp 0 0 *:netbios-ssn *:* LISTEN
tcp 0 0 localhost:783 *:* LISTEN
tcp 0 0 *:ssh *:* LISTEN
tcp 0 0 localhost:631 *:* LISTEN
tcp 0 0 helios.liquid.net:smtp *:* LISTEN
tcp 0 0 localhost:smtp *:* LISTEN

tcp 0 0 helios.liquid.net:33547 helios.liquid.net:imaps ESTABLISHED
tcp 0 0 helios.liquid.net:imaps helios.liquid.net:33547 ESTABLISHED
udp 0 0 helios.liqui:netbios-ns *:*

However I still cannot send mail via postfix, here is what the log tells me:
Quote:
Nov 4 15:00:59 [postfix/smtpd] TLS connection established from unknown[192.168.0.10]: TLSv1 with cipher RC4-MD5 (128/128 bits)
Nov 4 15:00:59 [postfix/smtpd] warning: SASL authentication problem: unable to open Berkeley db /etc/sasl2/sasldb2: Permission denied
- Last output repeated twice -
Nov 4 15:00:59 [postfix/smtpd] warning: SASL authentication failure: no secret in database
Nov 4 15:00:59 [postfix/smtpd] warning: unknown[192.168.0.10]: SASL DIGEST-MD5 authentication failed
Nov 4 15:01:00 [postfix/smtpd] disconnect from unknown[192.168.0.10]

I have tried everything in this thread to solve this problem as it seems to be common somehow. Will repeat all that again but right now it still gives me that error.
_________________
Greetings,
Proteus
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Documentation, Tips & Tricks All times are GMT
Goto page Previous  1, 2, 3 ... 7, 8, 9 ... 25, 26, 27  Next
Page 8 of 27

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum