-
-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
I created this script to help me test out this change: <https://gist.github.com/Jayman2000/30fb19578ad2dd978b9420b9739ec915>
- Loading branch information
1 parent
dc88cc9
commit 50eafee
Showing
3 changed files
with
159 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
temp_dir="$(mktemp -d --suffix=resholve-tests-parse-msmtp)" | ||
trap 'rm -rf -- "$temp_dir"' EXIT | ||
config="$temp_dir/msmtprc" | ||
email="$temp_dir/test.eml" | ||
export MSMTPQ_LOG="$temp_dir/msmtpq_log" | ||
export MSMTPQ_Q="$temp_dir/msmtpq_q" | ||
# TODO: We can remove this next line once this Nixpkgs PR gets merged: | ||
# <https://github.com/NixOS/nixpkgs/pull/296720> | ||
export MSMTP_LOG="$MSMTPQ_LOG" MSMTP_QUEUE="$MSMTPQ_Q" | ||
|
||
echo ' | ||
account default | ||
host example.com | ||
' > "$config" | ||
echo -ne 'To: foo@example.org\r\n' > "$email" | ||
echo -ne 'MIME-Version: 1.0\r\n' >> "$email" | ||
echo -ne '\r\n' >> "$email" | ||
|
||
< "$email" msmtp -PC "$config" --passwordeval=cat | ||
< "$email" msmtp -PC "$config" --passwordeval cat | ||
< "$email" msmtpq -PC "$config" --passwordeval=cat | ||
< "$email" msmtpq -PC "$config" --passwordeval cat | ||
# TODO: These commands are valid, but our parse doesn’t support them yet. | ||
#< "$email" msmtp -PC "$config" --passwordeval= | ||
#< "$email" msmtpq -PC "$config" --passwordeval= |