E597 Try #3915: · Mailu/Mailu@cdb3fd6 · GitHub
[go: up one dir, main page]

Skip to content

Commit cdb3fd6

Browse files
Try #3915:
2 parents e34771d + 03cba0c commit cdb3fd6

File tree

4 files changed

+4
-8
lines changed

4 files changed

+4
-8
lines changed

core/admin/mailu/ui/forms.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -203,7 +203,6 @@ class FetchForm(flask_wtf.FlaskForm):
203203
password = fields.PasswordField(_('Password'))
204204
keep = fields.BooleanField(_('Keep emails on the server'))
205205
scan = fields.BooleanField(_('Rescan emails locally'))
206-
invisible = fields.BooleanField(_('Keep original metadata (fetchmail invisible)'))
207206
folders = fields.StringField(_('Folders to fetch on the server'), [validators.Optional(), MultipleFoldersVerify()], default='INBOX,Junk')
208207
submit = fields.SubmitField(_('Submit'))
209208

core/admin/mailu/ui/templates/fetch/create.html

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
{%- call macros.card(title="Settings") %}
2626
{{ macros.form_field(form.keep) }}
2727
{{ macros.form_field(form.scan) }}
28-
{{ macros.form_field(form.invisible) }}
2928
{{ macros.form_field(form.folders) }}
3029
{%- endcall %}
3130

docs/webadministration.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,8 +161,6 @@ You can add a fetched account by clicking on the `Add an account` button on the
161161

162162
* Scan emails. When ticked, all the fetched emails will go through the local filters (rspamd, clamav, ...).
163163

164-
* Keep original metadata (fetchmail --invisible). When ticked, tries to make Mailu's fetchmail instance invisible. Normally, fetchmail behaves like any other MTA would -- it generates a Received header into each message describing its place in the chain of transmission, and tells the MTA it forwards to that the mail came from the machine fetchmail itself is running on. If the invisible option is on, the Received header is suppressed and fetchmail tries to spoof the MTA it forwards to into thinking it came directly from the mail server host.
165-
166164
* Folders. A comma separated list of folders to fetch from the server. This is optional, by default only the INBOX will be pulled.
167165

168166
Click the submit button to apply settings. With the default polling interval, fetchmail will start polling the email account after ``FETCHMAIL_DELAY``.

optional/fetchmail/fetchmail.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
--idfile /data/fetchids --uidl \
2020
--pidfile /dev/shm/fetchmail.pid \
2121
--sslcertck --sslcertpath /etc/ssl/certs \
22-
-f {}
22+
{} -f {}
2323
"""
2424

2525

@@ -55,7 +55,8 @@ def fetchmail(fetchmailrc):
5555
with tempfile.NamedTemporaryFile() as handler:
5656
handler.write(fetchmailrc.encode("utf8"))
5757
handler.flush()
58-
command = FETCHMAIL.format(shlex.quote(handler.name))
58+
fetchmail_custom_options = os.environ.get("FETCHMAIL_OPTIONS", "")
59+
command = FETCHMAIL.format(fetchmail_custom_options, shlex.quote(handler.name))
5960
output = subprocess.check_output(command, shell=True)
6061
return output
6162

@@ -66,10 +67,9 @@ def run(debug):
6667
for fetch in fetches:
6768
fetchmailrc = ""
6869
options = "options antispam 501, 504, 550, 553, 554"
69-
if "FETCHMAIL_OPTIONS" in os.environ: options += f'{ os.environ["FETCHMAIL_OPTIONS"]}'
70+
if "FETCHMAIL_POLL_OPTIONS" in os.environ: options += f' {os.environ["FETCHMAIL_POLL_OPTIONS"]}'
7071
options += " ssl" if fetch["tls"] else " sslproto \'\'"
7172
options += " keep" if fetch["keep"] else " fetchall"
72-
options += " invisible" if fetch["invisible"] else ""
7373
folders = f"folders {",".join(f'"{imaputf7encode(item).replace('"',r"\34")}"' for item in fetch["folders"]) or '"INBOX"'}"
7474
fetchmailrc += RC_LINE.format(
7575
user_email=escape_rc_string(fetch["user_email"]),

0 commit comments

Comments
 (0)
0