Commit Graph

796 Commits (master)

Author SHA1 Message Date
Martin Lambers 06aa09354a vim syntax file: fix whitespace handling
This closes
Patch submitted by an unknown Github user.
2023-08-12 16:31:14 +02:00
Martin Lambers 9b5ddffcba Improve Message-ID header generation
Previously, having the envlope from address as part of the Message-ID causes
rspamd to generate a SPAM point (for unknown reasons).

Now, the local part of the envelope from address is never part of the Message-ID,
and there is limited configurability of the domain part of the Message-ID.
2023-08-07 16:49:45 +02:00
Martin Lambers a546261a59 msmtpd: in AUTH PLAIN, accept and ignore non-empty authzid
This closes github issue #125.
2023-08-07 08:02:10 +02:00
Martin Lambers 55847d7ef7 Bump version to 1.8.24 2023-06-29 22:03:50 +02:00
Martin Lambers ef62463e4d Update NEWS 2023-06-29 22:03:28 +02:00
Martin Lambers c493dd79a2 Update translations 2023-06-29 21:56:49 +02:00
Martin Lambers 885a9879cf Fix CRAM-MD5 for passwords with more than 64 characters
This fixes github issue #121.

Issue documented and patch written by Nikolay Vizovitin.
2023-06-20 09:27:46 +02:00
Martin Lambers 17eabf3bb4 Fix allow_from_override command again
The logic prevented the envelope-from address to be taken from different
configuration file accounts (via inheritance, e.g. 'account default :
example'). However, the allow_from_override must only prevent taking the
envelope-from address from the --from option of the command line.

This fixes the second half of github issue #119
2023-04-26 21:08:50 +02:00
Martin Lambers af851aa191 Fix allow_from_override command: it was not properly inherited by accounts
This fixes github issue #119
2023-04-22 19:22:33 +02:00
Martin Lambers 67e854aff0 Add a command from_full_name to set a full name for a From header (like -F).
This fixes github issue #118.
2023-04-22 19:09:08 +02:00
Martin Lambers b4d2c31627 Report temporary failure when getaddrinfo() returns EAI_AGAIN
This fixes msmtp Github issue #116.
2023-04-22 17:56:54 +02:00
Martin Lambers c6addfa53d Update copyright year 2023-01-30 18:48:42 +01:00
Martin Lambers 2c689c1e79 Bump version to 1.8.23 2023-01-30 18:44:53 +01:00
Martin Lambers cfb8eab8da Update NEWS 2023-01-30 18:44:46 +01:00
Martin Lambers c7f5f3ba0d Update translations 2023-01-30 18:43:39 +01:00
Martin Lambers 7e5e2345c3 Add allow_from_override to msmtp_print_conf()
This fixes github issue #100, reported by Nick Briggs.
2022-10-01 23:21:05 +02:00
Martin Lambers ad05e370a8 Document that alias expansion does not affect mail headers 2022-09-02 10:37:31 +02:00
Jason Yundt c6ec6d5df4 msmtpq: don’t use log() before it’s defined
To fix this bug, I created a new function called log_later(). I
also considered moving the function definition for log() to before the
variable declarations, moving the variable declarations to underneath
the function declarations and moving the “"$MSMTP" --version” to the
script’s “entry point”. In the end I decided to create log_later() in
order to stay consistent with how the script was already written.

Fixes #93.
2022-08-29 20:37:22 +02:00
Jason Yundt 0c7e374ffa Fix msmtpq failing when $MSMTP contains spaces
The problem was that there was a line of code that didn’t quote $MSMTP,
so for consistency, I decided to make sure that every use of the MSMTP
variable was quoted (even if the quotes weren’t necessary).

Fixes #92.
2022-08-25 08:08:38 -04:00
Martin Lambers 1f3f4bfd09 Send XOAUTH2 in two lines, required by Microsoft servers
Reported, analyzed and fixed by Michaël Cadilhac for POP3/mpop;
according example SMTP sessions in the Microsoft documentation, this
also applies to SMTP.
2022-08-25 08:10:01 +02:00
Martin Lambers 22319c306f Document that eval commands are always evaluated. 2022-08-23 20:28:35 +02:00
Jason Yundt 791053cfe0 msmtpq: rename LOG to MSMTPQ_LOG
Now that this variable is sharing a namespace with the rest of the
system, its name should reflect the fact that it’s an msmtpq-specific
variable (see the previous commit for details).

I used these scripts [1] to help me test the changes in this commit.

Thanks to Peter Hoeg for suggesting this change [2].

[1]: <>
[2]: <>
2022-08-23 06:52:33 -04:00
Jason Yundt 98ad6b90d0 msmtpq: rename Q to MSMTPQ_Q
8139cf6 (msmtpq: inherit MSMTP, Q and LOG from environment, 2022-08-06)
allowed the Q variable to be set from outside of the msmtpq script.
Before that change, Q was a reasonable name for that variable. Now that
that variable is sharing a namespace with the rest of the system, its
name should reflect the fact that it’s specific to the msmtpq script.

At the time of writing, there’s one release of msmtp (1.8.22) that
contains the changes from 8139cf6 (msmtpq: inherit MSMTP, Q and LOG from
environment, 2022-08-06). For backwards compatibility with that release,
this change makes the Q variable a deprecated alias of MSMTPQ_Q.

I used these scripts [1] to help me test the changes in this commit.

Thanks to Peter Hoeg for suggesting this change [2].

[1]: <>
[2]: <>
2022-08-22 18:31:10 -04:00
Martin Lambers 05a3349b31 Merge branch 'msmtpq-always-check-exe' of into j 2022-08-22 20:37:03 +02:00
Jason Yundt 921d3c49d0 msmtpq: fix errors when $Q contains spaces
I also decided to quote some variable expansions that didn’t need to be
quoted but just happened to be on some of the lines that I modified in
this commit. I want to set a precedent: quote your variables unless
there’s a reason not to.

Fixes #87.
2022-08-12 12:32:01 -04:00
Jason Yundt 38aa1e02b2 msmtpq: always test the value of MSMTP
Before this change, msmtpq would only make sure that $MSMTP was valid if
the user had customized it. Even if MSMTP is left at its default value,
it’s still a good idea to make sure that the default value is valid.

This change was suggested by Peter Hoeg:
2022-08-10 07:00:12 -04:00
Martin Lambers 8ee1b0e42f Update NEWS 2022-08-07 17:46:54 +02:00
Martin Lambers c354eecde0 Bump version to 1.8.22 2022-08-07 17:46:11 +02:00
Martin Lambers c7ec6d484e Fix missing symbols when linking while building with libgsasl
This fixes guthub issue #85, reported by jpalus. Thanks!
2022-08-07 17:45:20 +02:00
Jason Yundt 43f0e4bece msmtpq: create parent dirs for $Q and $LOG
When I first tried to use msmtpq, I was a little bit confused by the
behavior of the Q and LOG variables. README.msmtpq does say that the
directories for those variables should be created before you run msmtpq,
but I didn’t notice that when I was first skimming through it.

This change makes msmtpq more resilient in those situations. Now, msmtpq
will not only create a directory for $Q and a directory for $LOG but
also create parent directories for those directories if necessary.

This change was inspired by a patch that was included in a nixpkgs PR:
<f8e3437ef2 (diff-db16f24325854530247bb84d212795a677d9477a0507fb9aa174f561653c5138R12)>
2022-08-07 17:42:27 +02:00
Jason Yundt 8139cf6207 msmtpq: inherit MSMTP, Q and LOG from environment
When a user is installing msmtpq simply by copying it to a location on
their PATH, it it perfectly reasonable to ask the user to edit msmtpq
before using it. However, when installing msmtpq via a package manager,
editing the msmtpq executable itself is not a good idea. In general,
files installed by a package manager should only be modified by that
package manager (unless the file is a configuration file).

Additionally, recommending that users to edit a script before it is used
creates friction when the script is updated. Every time the script is
updated, the user has to make those same changes again.

This change allows (and even encourages) the user to set the MSMTP, Q
and LOG variables from outside of the script. This allows users to
configure the location of the msmtp executable, msmtpq’s queue directory
and msmtpq’s log without modifying msmtpq itself.

This change was inspired by a patch that was included in a nixpkgs PR:
<f8e3437ef2 (diff-db16f24325854530247bb84d212795a677d9477a0507fb9aa174f561653c5138R11)>
2022-08-07 17:42:22 +02:00
Martin Lambers 91a5c7c43c Remove outdated passage from example user configuration 2022-08-07 12:42:27 +02:00
Martin Lambers 6d9500f3fa Update example system configuration 2022-08-07 12:25:55 +02:00
Martin Lambers f44964c4ec Update example user configuration 2022-08-07 12:24:31 +02:00
Martin Lambers b0a39ce01e Bump version to 1.8.21 2022-08-07 12:13:36 +02:00
Martin Lambers 0defc09847 Update translations 2022-08-07 12:13:13 +02:00
Jason Yundt f144a9be87 msmtpq: Restore old default connection test
716e47e (New version of msmtpq script, 2013-02-14) added the
connect_test() function. By setting EMAIL_CONN_TEST, the user could
select how connect_test() would check for a working Internet connection.
If the user didn’t specify EMAIL_CONN_TEST, then connect_test() would
use ping by default.

0f794b7 (Update msmtpq scripts., 2015-03-12) added a line that sets
EMAIL_CONN_TEST to “n”. This means two things:

1. The default connection test is no longer the one that uses ping, but
the comments in connect_test() still say that it’s the default.
2. The only way to switch to a different connection test is to edit the
msmtpq script itself.

Considering the number of changes in that commit and its brief commit
message, it seems like that change was unintentional.

This commit makes the connection test that uses ping the default again
and allows users to choose a different test without modifying the msmtpq
script itself.
2022-08-05 14:31:03 +02:00
Martin Lambers 97ef25221d Update vim and emacs sybtax files 2022-07-27 20:44:06 +02:00
Martin Lambers 4051dbc9dc msmtpd: improve Received header 2022-07-27 01:31:21 +02:00
Martin Lambers 69c1e68fe0 msmtpd: improve sanity checks on EHLO argument 2022-07-26 23:23:29 +02:00
Martin Lambers 98cc516aed Use CLOCK_BOOTTIME in Message-ID generation, as intended 2022-07-26 15:58:50 +02:00
Martin Lambers a04922b1eb Add --help string for set_msgid_header 2022-07-26 15:57:31 +02:00
Martin Lambers a62532648c msmtpd: add a Received header 2022-07-26 15:47:19 +02:00
Martin Lambers c70cf49b9a Add set_msgid_header with default setting 'auto' 2022-07-26 15:35:05 +02:00
Martin Lambers 2583739d04 man page: fix argument list of set_date_header 2022-07-26 15:26:29 +02:00
Martin Lambers e16c5d9d42 remove password_eval() which moved to eval() 2022-06-25 16:58:24 +02:00
Martin Lambers 8778f7c5be read_conffile: handle the eval command first 2022-06-25 16:45:17 +02:00
Martin Lambers 6865777eb0 Add new command eval. 2022-06-25 12:40:03 +02:00
Martin Lambers c7d4aec45a Don't expect host to never be NULL, part 2. 2022-06-07 12:53:51 +02:00
Martin Lambers ab23ba9a64 Don't expect host to never be NULL.
When a socket name is given, the host name may be NULL, which was not yet
accepted everywhere and lead to a null pointer dereference (i.e. crash) in a
strlen() call when logging was active.

In addition to this strlen() call, several printf() calls were fixed, although
these just printed '(null)' instead of dereferencing the pointer.

Reportes as Github issue 79:
2022-06-07 12:08:25 +02:00