fetchmail rule corrupt, cannot be shown or removed

All about messaging softwares and associated plugins

fetchmail rule corrupt, cannot be shown or removed

New postby mlschouten » Fri Mar 23, 2012 1:16 pm

Dear all,
i need some help with the following:

I have a VM with a clean Artica install (selected 'A' for "all" with install script) on a clean Ubuntu 10.04 LTS platform for a proof of concept.
after the basic install of Artica (including Samba, postfix and Cyrus amongst others) I ran
"/usr/share/artica-postfix/bin/artica-make APP_FETCHMAIL" in order to add fetchmail to the party.

I created a single organization with a single user configured.
The user has an IMAP accessible mailbox created via the Cyrus IMAP system tab.
I have made the distinction between username and mail address:
user: poohbear
mail: winniethepooh@domain.org
and created a fetchmail rule that is supposed to login to an external pop mail server with the same username and fetch all mail to the local server so it can be serviced (and stored) via IMAP.

In the rule
I specified port 995 , the server IP
i ticked ssl, but did not specify an ssl type (tls1 or ssl2 or some such type)
I specified the username, password and the local delivery e-mail address.
The rule is implemented and runs, however it produces errors in the event log

fetchmail: Query status=2 (SOCKET)
fetchmail: socket error while fetching from poohbear@192.168.1.1
fetchmail: SSL connection failed.
18274:error:140770FC:SSL routines:SSL23_GET_SERVER_HELLO:unknown protocol:s23_clnt.c:601:
Invalid SSL protocol '' specified, using default (SSLv23).
fetchmail: Query status=2 (SOCKET)
fetchmail: socket error while fetching from poohbear@192.168.1.1
fetchmail: SSL connection failed.
<repeating>
so apparently i misconfigured something in the rule

now when I go to the 'fetchmail rules'tab it says: "An error has occured making the request: Internal Server Error error"
and I cannot edit nor delete the faulty fetchmail rule.

Please help me remove the fetchmail rule (or preferably: the Internal Server Error) because it is in the database and editing the fetchmail rc directly only gets overwritten with the data from the database.

output from /etc/fetchmailrc
>
set logfile /var/log/fetchmail.log
set daemon 600
set postmaster "root"
set idfile "/var/log/fetchmail.id"

poll 192.168.1.1
proto pop3
user "poohbear"
pass $3cr3t
is winniethepooh@domain.org
ssl
sslproto ''
>

fetchmail is running:
pidof fetchmail
18274
root@test-vm:/var/lib/mysql/artica_events# ps -ef|grep 18274
root 18274 1 0 13:57 ? 00:00:00 /usr/bin/fetchmail --daemon 600 --pidfile /var/run/fetchmail.pid --fetchmailrc /etc/fetchmailrc

Thank you for your help
mlschouten
 
Posts: 3
Joined: Fri Mar 23, 2012 12:58 pm
Artica servers number: 1
Linux System: Ubuntu
Technical skills: A Linux System Administrator

Re: fetchmail rule corrupt, cannot be shown or removed

New postby admin » Sat Mar 24, 2012 10:46 am

Dear mlschouten

I suggest to upgrade Artica to 1.6.032411
I have totally rebuilded the fetchmail section and fix your issue.

to upgrade to a nightly build execute this commandline:
Code: Select all
/usr/share/artica-postfix/bin/artica-update --upgrade-nightly


24-03-2012 11-44-46.png
24-03-2012 11-44-46.png (89.33 KiB) Viewed 7232 times
User avatar
admin
Site Admin
 
Posts: 11941
Joined: Wed Oct 17, 2007 7:59 am
Location: France

Re: fetchmail rule corrupt, cannot be shown or removed

New postby mlschouten » Wed Mar 28, 2012 1:01 pm

thank you,
this solved the issue of being able to change fetchmail rules. Fetchmail is able to fetch messages but still fails at delivery though. In my opinion this is still a problem with the fetchmail engine

I have this user configured :
user: poohbear
mail: winniethepooh@domain.org

i have made a fetchmail rule fetching e-mail for user POOH@somePOPserver.com with password "password"
now when I configure local account as: poohbear (the actual local mailbox) it says: user not configured in LDAP database and thus refuses this input.
when I put in : winniethepooh@domain.org (the main smtp account of user poohbear) it accepts this input.

When i try to fetch mail the delivery fails:

<winniethepooh@domain.org>: host
test-vm.localhost.localdomain[/var/spool/postfix/var/run/cyrus/socket/lmtp]
said: 550-Mailbox unknown. Either there is no mailbox associated with this
550-name or you do not have authorization to see it. 550 5.1.1 User unknown
(in reply to RCPT TO command)

i have tried command line delivery with "swaks" on several levels:
* when I deliver to postfix directly using destination winniethepooh@domain.org postfix passes the e-mail on via lmtp to the cyrus unix socket.
cyrus refuses the e-mail: mailbox unknown
* when I deliver directly via lmtp to the cyrus unix socket using destination winniethepooh@domain.org cyrus refuses the e-mail: mailbox unknown
* when I deliver directly via lmtp to the cyrus unix socket using destination poohbear cyrus accepts and delivers the e-mail: everything fine and dandy.

So I decided to take a look at the alias and virtual tables:

root@test-vm:/etc/postfix# more aliases
postmaster:postmaster@domain.org
poohbear:winniethepooh@domain.org << account we're discussing here

this looks good.

root@test-vm:/etc/postfix# more virtual
postmaster@domain.org postmaster@domain.org
winniethepooh@domain.org winniethepooh@domain.org << account we're discussing here
hostmaster@domain.org postmaster@domain.org
webmaster@domain.org postmaster@domain.org
abuse@domain.org postmaster@domain.org

this does not look very well.
apparently the virtual table takes precedence over the alias table and the virtual table does not correctly rewrite the winniethepooh@domain.org address to the correct local poohbear user account which the alias table would.
this is why delivery fails.

Can you tell me what should be configured in Artica to correctly reflect this either using postfix or fetchmail settings.?
For the life of me I cannot find it.

I would be content with the fetchmail rules being able to take the REAL local account name as the "Local account:" setting, but artica refuses this.
the alternative is the virtual table correctly rewriting the destination to the real local account.

thank you
mlschouten
 
Posts: 3
Joined: Fri Mar 23, 2012 12:58 pm
Artica servers number: 1
Linux System: Ubuntu
Technical skills: A Linux System Administrator

Re: fetchmail rule corrupt, cannot be shown or removed

New postby admin » Wed Mar 28, 2012 1:15 pm

Have change the mailbox system to the multiple domains ?
I yes you need to rebuild mailboxes after enabling this feature.
User avatar
admin
Site Admin
 
Posts: 11941
Joined: Wed Oct 17, 2007 7:59 am
Location: France

Re: fetchmail rule corrupt, cannot be shown or removed

New postby mlschouten » Wed Mar 28, 2012 1:24 pm

Thank you for your reply admin,

no multi-domains is off,
I have however rebuilt the mailboxes just to see if it would make a difference.
mlschouten
 
Posts: 3
Joined: Fri Mar 23, 2012 12:58 pm
Artica servers number: 1
Linux System: Ubuntu
Technical skills: A Linux System Administrator

Re: fetchmail rule corrupt, cannot be shown or removed

New postby admin » Wed Mar 28, 2012 2:40 pm

no multi-domains is off,


You must set to be on
User avatar
admin
Site Admin
 
Posts: 11941
Joined: Wed Oct 17, 2007 7:59 am
Location: France


Return to Messaging

Who is online

Users browsing this forum: No registered users and 1 guest

cron