Univention Bugzilla – Bug 44443
Add arbitrary options to each "poll" line in fetchmailrc
Last modified: 2020-07-03 20:55:47 CEST
Fetchmail should also support 'smtpHost' and 'smtpName'. This needs 3 steps to realize: - add 2 extended attributes - add them to the ldap schema /var/lib/univention-ldap/local-schema/univention-fetchmail.schema - extend the UDM Hook /usr/lib/univention-directory-listener/system/fetchmailrc.py
Can you please explain which scenario shall be supported by adding these 2 options?
(In reply to Sönke Schwardt-Krummrich from comment #1) > Can you please explain which scenario shall be supported by adding these 2 > options? This was a customers request. afiak the environment has two mailservers and the customer already rewrites the mail address. So by fulfill this FR it is possible to fetch external mails to a specific mailserver and change the mail address from an external to the internal one.
(In reply to Nico Stöckigt from comment #2) > afiak the environment has two mailservers and the customer already rewrites > the mail address. So by fulfill this FR it is possible to fetch external > mails to a specific mailserver and change the mail address from an external > to the internal one. JFYI: For rewriting external addresses to internal one and vice versa the UCS package univention-mail-canonical-maps can be used. This package defines additional extended attributes that are evaluated on each UCS mail system. The forwarding to specific mailboxes is done via the univentionMailHomeServer attribute. I currently do not see the benefit of fetching mails on one system and directly sending it to another postfix instead of the local postfix.
(In reply to Sönke Schwardt-Krummrich from comment #1) > Can you please explain which scenario shall be supported by adding these 2 > options? The customer request if fetchmail could forward the mail to another smtp server instead of deliver the mail to the (UCS) mailserver with the users mailbox. Therefor fetchmail has the option to specify 'smtpHost' and 'smtpName' to send the fetched mail direct to another mailserver (smtpHost, see http://www.fetchmail.info/fetchmail-man.html#34). In deed the customer environment has a mail archive system, which also do a lot of mail filter before the mail 1) is archived and 2) is delivered to the user's mailbox. Thats why the postfix archive mode via always_bcc is not working in this scenario.
This is a rather rare scenario. I would suggest to implement a generic solution that allows customers to add arbitrary fetchmail options. Suggestion: UCR-Variable that contains a string that is appended to each fetchmailrc line: fetchmail/useroptions/append=\ 'smtphost "extern.example.com" smtpname "%(univentionFreeAttribute2)s"' This way the requested values are appended to each user line in fetchmailrc. If user specific values are required: fetchmail/useroptions/append="%(univentionFreeAttribute3)s" So the customer is able to specify user specific options via an extended attribute (univentionFreeAttribute3) in UMC.
A ucs-test script should check if a) the values from the UCR variable are appended if specified and b) if LDAP attributes are correctly inserted if they do exist in LDAP, otherwise replaced with an empty string.
About the only reason i'm not using UCS yet is because i rely on multidrop for mail in several locations. A way to append (or optionally overrule) each fetchmailrc line on a per-user basis would seem to open up possibilities. Is there any chance this use-case can be taken into account with the suggested generic solution?
This issue has been filed against UCS 4.2. UCS 4.2 is out of maintenance and many UCS components have changed in later releases. Thus, this issue is now being closed. If this issue still occurs in newer UCS versions, please use "Clone this bug" or reopen it and update the UCS version. In this case please provide detailed information on how this issue is affecting you.