Sample Header Ad - 728x90

Unix & Linux Stack Exchange

Q&A for users of Linux, FreeBSD and other Unix-like operating systems

Latest Questions

1 votes
2 answers
3976 views
Mutt error SMTP session failed: read error
set ssl_starttls=yes set ssl_force_tls=yes set imap_user = 'name@gmail.com' set imap_pass = 'password' set from='name@gmail.com' set realname='name@gmail.com' set folder = imaps://imap.gmail.com/ set spoolfile = imaps://imap.gmail.com/INBOX set postponed="imaps://imap.gmail.com/[Gmail]/Drafts" set h...
set ssl_starttls=yes set ssl_force_tls=yes set imap_user = 'name@gmail.com' set imap_pass = 'password' set from='name@gmail.com' set realname='name@gmail.com' set folder = imaps://imap.gmail.com/ set spoolfile = imaps://imap.gmail.com/INBOX set postponed="imaps://imap.gmail.com/[Gmail]/Drafts" set header_cache = "~/.mutt/cache/headers" set message_cachedir = "~/.mutt/cache/bodies" set certificate_file = "~/.mutt/certificates" set smtp_url = 'smtp://name@gmail.com:password@smtp.gmail.com:465/' set move = no set imap_keepalive = 900 set smtp_pass="secrets" When sending a mail got that error. Firewall also off on server and port 465 open on Security group. Is it required to install postfix with mutt? Connection to smtp.gmail.com closed SMTP session failed: read error Could not send the message. I can read the mails on my inbox but can't send emails. This is on my maillog,
Mar  1 10:20:01 appsvr2 postfix/qmgr: 9703F3F7974: from=, size=768, nrcpt=1 (queue active)
Mar  1 10:20:01 appsvr2 postfix/local: 9427E3F796E: to=, orig_to=, relay=local, delay=0.04, delays=0.03/0.01/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Mar  1 10:20:01 appsvr2 postfix/qmgr: 9427E3F796E: removed
Mar  1 10:20:01 appsvr2 postfix/local: 9703F3F7974: to=, orig_to=, relay=local, delay=0.04, delays=0.03/0.01/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Mar  1 10:20:01 appsvr2 postfix/qmgr: 9703F3F7974: removed
Mar  1 10:30:01 appsvr2 postfix/pickup: A43FB3E643: uid=0 from=
Mar  1 10:30:01 appsvr2 postfix/cleanup: A43FB3E643: message-id=
Mar  1 10:30:01 appsvr2 postfix/qmgr: A43FB3E643: from=, size=827, nrcpt=1 (queue active)
Mar  1 10:30:01 appsvr2 postfix/local: A43FB3E643: to=, orig_to=, relay=local, delay=0.04, delays=0.03/0.01/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Mar  1 10:30:01 appsvr2 postfix/qmgr: A43FB3E643: removed
vish (111 rep)
Feb 20, 2019, 08:52 AM • Last activity: Jul 13, 2025, 07:02 PM
0 votes
1 answers
2675 views
Mutt Login Failed
I was using `mutt` for few months until it started giving an error: "Login failed". When I do `mutt -d 5` [2022-06-08 14:27:17] SASL local ip: 2401:4900:170d:264a:c146:ad26:5e83:fe0e;45008, remote ip:2404:6800:4003:c11::6d;993 [2022-06-08 14:27:17] External SSF: 256 [2022-06-08 14:27:17] mutt_sasl_c...
I was using mutt for few months until it started giving an error: "Login failed". When I do mutt -d 5 [2022-06-08 14:27:17] SASL local ip: 2401:4900:170d:264a:c146:ad26:5e83:fe0e;45008, remote ip:2404:6800:4003:c11::6d;993 [2022-06-08 14:27:17] External SSF: 256 [2022-06-08 14:27:17] mutt_sasl_cb_authname: getting authname for imap.gmail.com:993 [2022-06-08 14:27:17] mutt_sasl_cb_authname: getting user for imap.gmail.com:993 [2022-06-08 14:27:17] mutt_sasl_cb_pass: getting password for garv.lodha@gmail.com@imap.gmail.com:993 [2022-06-08 14:27:17] Authenticating (PLAIN)... [2022-06-08 14:27:17] 4> a0001 AUTHENTICATE PLAIN Z2Fydi5sb2RoYUBnbWFpbC5jb20AZ2Fydi5sb2RoYUBnbWFpbC5jb20AYmhAZ3ZAZGdpdEAxJiU= [2022-06-08 14:27:18] 4 a0002 LOGIN "garv.lodha@gmail.com" "password" [2022-06-08 14:27:18] 4 a0003 LOGOUT [2022-06-08 14:27:43] 4< * BYE Logout Requested s1mb93885201jar [2022-06-08 14:27:43] Handling BYE Any help is appreciated.
Garv (1 rep)
Jun 24, 2022, 12:14 PM • Last activity: Jun 30, 2025, 07:02 PM
3 votes
1 answers
2382 views
How to get subject of gmail letter with curl?
I use `curl` in my Lua program to get new mail list. I am trying to send request like this ```lua local head_command = "curl --connect-timeout 30 -fsm 30" local server = "imap.gmail.com" local mail = "***" local password = "***" local port = 993 local request = "-X 'FETCH 86 BODY.PEEK[HEADER.FIELDS...
I use curl in my Lua program to get new mail list. I am trying to send request like this
local head_command = "curl --connect-timeout 30 -fsm 30"
local server       = "imap.gmail.com"
local mail         = "***"
local password     = "***"
local port         = 993
local request      = "-X 'FETCH 86 BODY.PEEK[HEADER.FIELDS (SUBJECT)]'"
local curl = string.format("%s --url 'imaps://%s:%s/INBOX' -u %s:%q %s -k", head_command, server, port, mail, password, request)
helpers.async(curl, function(stdout, exit_code)
  naughty.notify { text = stdout, timeout = 0 }
end )
But only I get is
* 86 FETCH (BODY[HEADER.FIELDS (SUBJECT)] {54}
And I get response like this for any FETCH command. I can get message HEADER if specify UID in url directly like
imaps://%s:%s/INBOX;UID=86/;SECTION=HEADER
It outputs this
Delivered-To: bugaev.nsu@gmail.com

Received: by 10.140.91.106 with SMTP id y97csp1976911qgd; Mon, 25 May 2015
 18:50:08 -0700 (PDT)
X-Received: by 10.112.142.232 with SMTP id rz8mr19609586lbb.74.1432605008430;
 Mon, 25 May 2015 18:50:08 -0700 (PDT)
Return-Path: 
Received: from f342.i.mail.ru (f342.i.mail.ru. [217.69.140.238]) by
 mx.google.com with ESMTPS id b3si5030682lbd.117.2015.05.25.18.50.07 for
  (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256
 bits=128/128); Mon, 25 May 2015 18:50:08 -0700 (PDT)
Received-SPF: pass (google.com: domain of bugaevamv@mail.ru designates
 217.69.140.238 as permitted sender) client-ip=217.69.140.238;
Authentication-Results: mx.google.com; spf=pass (google.com: domain of
 bugaevamv@mail.ru designates 217.69.140.238 as permitted sender)
 smtp.mail=bugaevamv@mail.ru; dkim=pass header.i=@mail.ru; dmarc=pass (p=NONE
 dis=NONE) header.from=mail.ru
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=mail.ru;
 s=mail2; h=Content-Type:Message-ID:Reply-To:Date:MIME-Version:To:From;
 bh=vOFnL58jZvcsH24k/6XvHT0DhLLtNvAaCxTAZUvggn4=;
 b=GJpRK8wJfOfrrlW6KycI6CDBUPTlQNBSNmAswE+5M67hdePFUeoHkakQdh8ziPtmOPsSWCwLs2spcqXjTkQ1Ny2raWBrbVaaFKPSxzdi7m6JGfwJ3Snkv1DMGBhGVCqBOIwVj7iCdnBEzYQhCMgZ6UvjDNv15PReV5MiJzECnG0=;
Received: from [194.125.255.143] (ident=mail) by f342.i.mail.ru with local
 (envelope-from ) id 1Yx40N-0001gA-0m for
 bugaev.nsu@gmail.com; Tue, 26 May 2015 04:50:07 +0300
Received: from [194.125.255.143] by e.mail.ru with HTTP; Tue, 26 May 2015
 04:50:06 +0300
From: =?UTF-8?B?0JzQsNGA0LjQvdCwINCR0YPQs9Cw0LXQstCw?= 
To: =?UTF-8?B?0JrQuNGA0LjQu9C7INCR0YPQs9Cw0LXQsg==?= 
MIME-Version: 1.0
X-Mailer: Mail.Ru Mailer 1.0
X-Originating-IP: [194.125.255.143]
Date: Tue, 26 May 2015 04:50:06 +0300
Reply-To: =?UTF-8?B?0JzQsNGA0LjQvdCwINCR0YPQs9Cw0LXQstCw?= 
X-Priority: 3 (Normal)
Message-ID: 
Content-Type: multipart/alternative;
 boundary="--ALT--rUEeoQugXy3WMzk9UAxdG7pumUrVItQl1432605006"
X-Mras: Ok
X-Spam: undefined
But how can I get message SUBJECT this way?
Kirill Bugaev (151 rep)
Aug 20, 2019, 06:22 AM • Last activity: Jun 15, 2024, 07:07 AM
51 votes
8 answers
94954 views
Simplest way to send one-line mail out via command line using gmail?
Using Raspbian and Ubunntu 16.04 LTS so need a generic Linux solution. Requirement is simple: **I need a way to send one-line email messages from the command line.** I have set up a gmail account just for this particular Rpi3, with the address of rpi3abc@gmail.com - with no 2FA So now I need to be a...
Using Raspbian and Ubunntu 16.04 LTS so need a generic Linux solution. Requirement is simple: **I need a way to send one-line email messages from the command line.** I have set up a gmail account just for this particular Rpi3, with the address of rpi3abc@gmail.com - with no 2FA So now I need to be able to send one-line mail messages from anywhere (including cron) without user intervention. ----------------------- I also would like it to be able to send text files; basically, anything from stdin.
SDsolar (1899 rep)
May 9, 2017, 02:19 AM • Last activity: Jan 30, 2024, 01:22 PM
0 votes
0 answers
143 views
How to expunge email from the Gmail "All Mail" directory over IMAP? (with Alpine e-mail)
Looking to [manually][1] save quantities of e-mail in batches so that they're [deleted and expunged][2] from Gmail to free up space. From Alpine the error message received is: [No messages expunged from folder "[Gmail]/All Mail"] Moving these messages to Gmail/Trash will enable expunge to function c...
Looking to manually save quantities of e-mail in batches so that they're deleted and expunged from Gmail to free up space. From Alpine the error message received is: [No messages expunged from folder "[Gmail]/All Mail"] Moving these messages to Gmail/Trash will enable expunge to function correctly. Presumably this is a safety feature of Google? Preventing deletion of e-mail in the All Mail directory over IMAP would seem to be a configuration of Gmail. Aside from running dovecot and postfix, are there other suggestions? The mail as from Alpine: Dir: [Gmail]/ --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- All Mail[/] Chats[/] Drafts[/] Important[/] Sent Mail[/] Spam[/] Starred[/] Trash[/]
Nicholas Saunders (565 rep)
Dec 22, 2023, 08:46 AM
0 votes
1 answers
141 views
Where does fetchmail store e-mails?
Having removed procmail, am looking for where fetchmail is storing messages: nicholas@mordor:~$ nicholas@mordor:~$ tail -f /var/log/fetchmail.log fetchmail: IMAP A0004 SEARCH UNSEEN UNDELETED fetchmail: IMAP A0005 LOGOUT fetchmail: IMAP A0001 CAPABILITY fetchmail: IMAP A0002 LOGIN "saunders.nicholas...
Having removed procmail, am looking for where fetchmail is storing messages: nicholas@mordor:~$ nicholas@mordor:~$ tail -f /var/log/fetchmail.log fetchmail: IMAP A0004 SEARCH UNSEEN UNDELETED fetchmail: IMAP A0005 LOGOUT fetchmail: IMAP A0001 CAPABILITY fetchmail: IMAP A0002 LOGIN "saunders.nicholas@gmail.com" * fetchmail: IMAP A0003 SELECT "INBOX" fetchmail: IMAP A0004 SEARCH UNSEEN UNDELETED fetchmail: IMAP A0005 LOGOUT fetchmail: IMAP< * BYE LOGOUT Requested fetchmail: IMAP< A0005 OK 73 good day (Success) fetchmail: 6.4.27 querying imap.gmail.com (protocol IMAP) at Sat 16 Dec 2023 10:31:35 AM: poll completed fetchmail: sleeping at Sat 16 Dec 2023 10:31:35 AM for 600 seconds nothing where expected: nicholas@mordor:~$ nicholas@mordor:~$ ll /var/spool/mail/nicholas -rw------- 1 nicholas mail 0 Nov 27 15:52 /var/spool/mail/nicholas nicholas@mordor:~$ nicholas@mordor:~$ ll /var/mail/nicholas -rw------- 1 nicholas mail 0 Nov 27 15:52 /var/mail/nicholas nicholas@mordor:~$ As I'm using the Alpine e-mail client, there's some mail in my home directory under Mail, but none of the mbox files have recent activity to match the fetchmail activity. Fetchmail configured as: nicholas@mordor:~$ nicholas@mordor:~$ cat .fetchmailrc set postmaster "saunders" set daemon 60 set invisible set postmaster administrator set syslog set logfile /var/log/fetchmail.log set daemon 600 poll imap.gmail.com with proto IMAP user 'saunders.nicholas@gmail.com' there with password 'xxx' is local_user here options ssl fetchlimit 1 keep # folder "fetching" nicholas@mordor:~$ where the fetchmail is limiting it's known where the mail's be stored. It's correct to poll "imap.gmail.com"? Using the "app" password which Alpine uses as a work-around to 2FA. No password problems, just confirming configuration. Can fetchmail be configured to explicitly use a particular directory or folder? Nothing in "~/.fetchids" either. Nothing listening on port 25. log shows: fetchmail: awakened by signal 10 fetchmail: restarting fetchmail (/home/nicholas/.fetchmailrc changed) fetchmail: starting fetchmail 6.4.27 daemon fetchmail: 31 messages (31 seen) for saunders.nicholas@gmail.com at imap.gmail.com. fetchmail: 31 messages (31 seen) for saunders.nicholas@gmail.com at imap.gmail.com. fetchmail: restarting fetchmail (/home/nicholas/.fetchmailrc changed) fetchmail: starting fetchmail 6.4.27 daemon fetchmail: 31 messages (31 seen) for saunders.nicholas@gmail.com at imap.gmail.com. fetchmail: 31 messages (31 seen) for saunders.nicholas@gmail.com at imap.gmail.com. fetchmail: awakened by signal 10 fetchmail: 32 messages (31 seen) for saunders.nicholas@gmail.com at imap.gmail.com. fetchmail: reading message saunders.nicholas@gmail.com@imap.gmail.com:32 of 32 (613 header octets) (log message incomplete) fetchmail: Connection errors for this poll: name 0: connection to localhost:smtp [127.0.0.1/25] failed: Connection refused. fetchmail: SMTP connect to localhost failed fetchmail: SMTP transaction error while fetching from saunders.nicholas@gmail.com@imap.gmail.com and delivering to SMTP host localhost fetchmail: Query status=10 (SMTP) fetchmail: 32 messages (31 seen) for saunders.nicholas@gmail.com at imap.gmail.com. fetchmail: reading message saunders.nicholas@gmail.com@imap.gmail.com:32 of 32 (613 header octets) (log message incomplete) fetchmail: Connection errors for this poll: name 0: connection to localhost:smtp [127.0.0.1/25] failed: Connection refused. fetchmail: SMTP connect to localhost failed fetchmail: SMTP transaction error while fetching from saunders.nicholas@gmail.com@imap.gmail.com and delivering to SMTP host localhost fetchmail: Query status=10 (SMTP) Just looking to grab a single message and store it locally. I can change the fetchmail configuration, but hesitate to start downloading too many e-mails until I figure out where the ones it did save are being stored. nicholas@mordor:~$ nicholas@mordor:~$ telnet localhost 25 Trying 127.0.0.1... telnet: Unable to connect to remote host: Connection refused nicholas@mordor:~$ nicholas@mordor:~$ hostname -f mordor.saundersconsulting.tech nicholas@mordor:~$ nicholas@mordor:~$ telnet mordor.saundersconsulting.tech 25 Trying 127.0.1.1... telnet: Unable to connect to remote host: Connection refused nicholas@mordor:~$
Nicholas Saunders (565 rep)
Dec 16, 2023, 06:42 PM • Last activity: Dec 16, 2023, 09:03 PM
0 votes
0 answers
63 views
What username, server and port are specified for IMAP with Gmail using getmail?
Looking at github and trying to use their [example][1] config file: nicholas@mordor:~$ nicholas@mordor:~$ cat .config/getmail/getmail [options] verbose = 1 delete = false message_log = ~/.getmail/log message_log_verbose = true read_all = false [retriever] type = SimpleIMAPSSLRetriever server = imap....
Looking at github and trying to use their example config file: nicholas@mordor:~$ nicholas@mordor:~$ cat .config/getmail/getmail [options] verbose = 1 delete = false message_log = ~/.getmail/log message_log_verbose = true read_all = false [retriever] type = SimpleIMAPSSLRetriever server = imap.gmail.com port = 993 username = saunders.nicholas@gmail.com password = xxx #mailboxes = ("INBOX") [destination] type = Mboxrd path = ~/GotMail/inbox user = saunders nicholas@mordor:~$ nicholas@mordor:~$ getmail getmail version 6.18.4 Copyright (C) 1998-2021 Charles Cazabon and others. Licensed under GNU GPL version 2. SimpleIMAPSSLRetriever:saunders.nicholas@gmail.com@imap.gmail.com:993: Configuration error: no such specified user ("getpwnam(): name not found: 'saunders'") nicholas@mordor:~$ nicholas@mordor:~$ lsb_release -a No LSB modules are available. Distributor ID: Ubuntu Description: Ubuntu 22.04 LTS Release: 22.04 Codename: jammy nicholas@mordor:~$ Trying getmail to archive old e-mails from gmail. I've tried a few options with the server, port and username but can't find a combination which works. The Pine e-mail client works fine with 2FA and using the app password, so fairly certain it's server name, username or something like that. Logs are empty. see also: https://www.bytereef.org/howto/oauth2/getmail.html where he specifies: type = SimpleIMAPSSLRetriever server = imap.gmail.com username = your_account@gmail.com
Nicholas Saunders (565 rep)
Dec 15, 2023, 08:45 PM
0 votes
1 answers
190 views
How to set the X-Google-Original-From header in Alpine (Pine) email?
*Why the random down-vote? At least say what the problem with the question is.* ----------------- I'm using `Gmail` and `Alpine` for e-mail with `IMAP`. Mail sent from `Alpine` has this field: X-Google-Original-From: foo whereas it should be my `Gmail` address, of course. where can I explicitly set...
*Why the random down-vote? At least say what the problem with the question is.* ----------------- I'm using Gmail and Alpine for e-mail with IMAP. Mail sent from Alpine has this field: X-Google-Original-From: foo whereas it should be my Gmail address, of course. where can I explicitly set this value with Alpine? see : Configuring other Headers If you want to configure the value of a header that does not appear in the above list, you will need to edit your configuration file. The way to do this is by going to the configuration screen and adding the following text to the Customized Headers option: Customized Headers = Header_name: Value The Value part above is not required, nor is the colon after the Header_name. Here are some examples of possible additions you may want to consider Customized Headers = From: "Your Name" , Reply-To: "Your Name" , Control:, Status:, X-Status: But this is an "x header" value. -------------------- new info: Seems like setting "use sender instead of x-x sender" helps with forcing Google to use the gmail address. This is manually entering a full e-mail into the "from" header when composing. Perhaps there's a way to autopopulate that? Still testing how that works.
Nicholas Saunders (565 rep)
Dec 5, 2023, 06:52 AM • Last activity: Dec 5, 2023, 08:35 PM
0 votes
0 answers
245 views
ssmtp vs. Gmail
I am trying to setup my raspberry's ssmtp to use my Gmail account. I followed recommendations I found around, everything looks ok but the mail does not come. ssmtp.conf: ``` root= @gmail.com mailhub=smtp.gmail.com:587 hostname= .ydns.eu FromLineOverride=YES AuthUser= @gmail.com AuthPass=16charpassfr...
I am trying to setup my raspberry's ssmtp to use my Gmail account. I followed recommendations I found around, everything looks ok but the mail does not come. ssmtp.conf:
root=@gmail.com
mailhub=smtp.gmail.com:587
hostname=.ydns.eu
FromLineOverride=YES
AuthUser=@gmail.com
AuthPass=16charpassfromGoogle
UseSTARTTLS=Yes
UseTLS=YES
revaliases:
root:@gmail.com:smtp.gmail.com:587
pi:@gmail.com:smtp.gmail.com:587
actual command:
pi@raspberrypi:~ $ echo -e  "to: @gmail.com\nsubject: [RASPBERRY]\n\nTest 1...2...3" |  ssmtp -vvv @gmail.com
[] EHLO .ydns.eu
[] STARTTLS
[] EHLO .ydns.eu

close(4)                                = 0
getuid32()                              = 1000
openat(AT_FDCWD, "/etc/passwd", O_RDONLY|O_CLOEXEC) = 4
_llseek(4, 0, , SEEK_CUR)            = 0
fstat64(4, {st_mode=S_IFREG|0644, st_size=2307, ...}) = 0
read(4, "root:x:0:0:root:/root:/bin/bash\n"..., 4096) = 2307
close(4)                                = 0
ioctl(0, TCGETS, 0xbef3b238)            = -1 ENOTTY (Inappropriate ioctl for device)
openat(AT_FDCWD, "/home/pi/dead.letter", O_WRONLY|O_CREAT|O_APPEND, 0666) = 4
_llseek(4, 0, , SEEK_END)          = 0
fstat64(4, {st_mode=S_IFREG|0644, st_size=657, ...}) = 0
write(4, "\n\n", 2)                     = 2
close(4)                                = 0
exit_group(1)                           = ?
+++ exited with 1 +++
What is it trying to do with /etc/passwd and what should I get from "Inappropriate ioctl for device" message? What do I miss?
user1608790 (101 rep)
Jun 20, 2023, 05:01 PM • Last activity: Jun 21, 2023, 08:49 AM
2 votes
0 answers
726 views
neomutt+lieer: how to make deletion in neomutt sync properly to GMail?
I've recently migrated from mutt to neomutt, and have at the same time been moving from accessing my mailboxes live through IMAP to working with local frequently-synced copies, with a notmuch database. I have both an Outlook (work) address and a Gmail (personal) address. The outlook mail I'm syncing...
I've recently migrated from mutt to neomutt, and have at the same time been moving from accessing my mailboxes live through IMAP to working with local frequently-synced copies, with a notmuch database. I have both an Outlook (work) address and a Gmail (personal) address. The outlook mail I'm syncing with davmail and OfflineIMAP, and AFAICT it's working well. It's the GMail that's giving me grief; I'm syncing it with lieer which seems to for the most part do a good job, but I'm having a really difficult time with handling the process for message deletion. I can't find anyone else with this specific problem, so I'm guessing the answer is something stupidly simple I'm doing wrong. I'm basically trying to follow more-or-less the workflow described here , although I'm not even trying to use lieer to send mail. The issue AFACT is that neomutt seems to follow one of a few behaviors with regard to what "deleting" a message means, and none of them seem to play quite right with the kind of thing lieeer wants to see to ensure a message is trashed cloudside. Here are the prospects I've looked at: * maildir_trash set to "no", trash unset. AFAICT, this setting makes neomutt unlink (as in, remove the associated file in the appropriate Maildirs) the message. Since lieer won't/can't push deletions (which is probably a good thing), that doesn't remove the messages cloudside on sync. * maildir_trash set to "no", trash set. This is what I used to do, because IMAP connection to GMail provided a [Trash] folder. lieer seems to bring everything in with one monolithic maildir folder (called "mail", and within the lieer working directory), so unless there's a clever way to do this so that trash is a tag rather than a directory, it still doesn't seem to do what I want; changing the path to a message file seems like it would resemble a deletion to lieer, since it would take it out of the lieer sync path. * maildir_trash set to "yes". This seemed really pretty promising, because it seemed like it would set a flag rather than relocate the file, leaving it in the right directory but flagged as trash. Unfortunately, that flag never seems to make it to notmuch (this is apparently by design ) and thus never makes it to lieer. I could add another layer of byzantine automation to translate the flag myself, but I assume if that were necessary someone else would have talked about it. A nonzero number of other people use lieer, notmuch, and neomutt, and nothing I've searched on suggests others have this problem, which suggests I've somehow broken something configured correctly by default? I include below an anonymized version of my .notmuch-config and most of my .neomuttrc (there's a lot of code to color various specific message patterns which I've elided, as it's probably not relevant):
[database]
path=/home/username/Private/.mail

[user]
primary_email=username@gmail.com
other_email=username@work.edu

[new]
tags=new
ignore=/.*[.](json|lock|bak)$/

[search]

[maildir]
synchronize_flags=true

[query]
workmail=folder:account.work/INBOX
gmail=folder:/account.gmail/ AND tag:inbox AND NOT tag:trash
virtual-mailboxes work "notmuch://?query=query:workmail"
virtual-mailboxes gmail "notmuch://?query=query:gmail"
virtual-mailboxes allmail "notmuch://?query=query:workmail OR query:gmail"

send2-hook '~f gmail.com' "source ~/.mutt/accounts/muttrc.gmail"
send2-hook '~f work.edu' "source ~/.mutt/accounts/muttrc.work"

reply-hook '~C work.edu' "source ~/.mutt/accounts/muttrc.work"
reply-hook '~C username.*@gmail.com' "source ~/.mutt/accounts/muttrc.gmail"

message-hook '!(~g|~G) ~b"^-----BEGIN\ PGP\ (SIGNED\ )?MESSAGE"' "exec check-traditional-pgp"

unignore date

alternates '^username'

source "~/.mutt_aliases"

set abort_noattach=ask-no
set abort_noattach_regex = "\\"
set abort_unmodified=ask-yes
set alias_file="~/.mutt_aliases"
set allow_ansi=yes
set arrow_cursor=yes
set askbcc=yes
set askcc=yes
set beep=no
set beep_new=yes
set certificate_file="~/.mutt_certs"
set confirm_append=no
set copy=yes
set crypt_auto_sign=yes
set edit_headers=yes
set editor="emacs -nw"
set folder="~/.mail"
set header_cache=~/.mutt/cache/headers
set history=20
set implicit_autoview=yes
set keep_flagged=yes
set mailcap_path="~/.mailcap"
set maildir_trash=yes
set mbox_type="Maildir"
set message_cachedir=~/.mutt/cache/bodies
set mime_forward=ask-no
set move=no
set nm_default_uri  = "notmuch:///home/username/.mail"
set pager_stop=yes
set pgp_clear_sign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --armor --textmode --clearsign %?a?-u %a? %f"
set pgp_decode_command="gpg --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f"
set pgp_decrypt_command="gpg --status-fd=2 %?p?--passphrase-fd 0? --no-verbose --quiet --batch --output - %f"
set pgp_encrypt_only_command="/usr/lib/mutt/pgpewrap gpg --batch --quiet --no-verbose --output - --encrypt --textmode --armor --always-trust -- -r %r -- %f"
set pgp_sign_command="gpg --no-verbose --batch --quiet --output - %?p?--passphrase-fd 0? --armor --detach-sign --textmode %?a?-u %a? %f"
set pgp_encrypt_sign_command="/usr/lib/mutt/pgpewrap gpg %?p?--passphrase-fd 0? --batch --quiet --no-verbose --textmode --output - --encrypt --sign %?a?-u %a? --armor --always-trust -- -r %r -- %f"
set pgp_export_command="gpg --no-verbose --export --armor %r"
set pgp_good_sign="^\\[GNUPG:\\] GOODSIG"
set pgp_import_command="gpg --no-verbose --import %f"
set pgp_list_pubring_command="gpg --no-verbose --batch --quiet --with-colons --list-keys %r" 
set pgp_list_secring_command="gpg --no-verbose --batch --quiet --with-colons --list-secret-keys %r" 
set pgp_sign_as="0xXXXXXXXX"
set pgp_timeout=1800
set pgp_verify_command="gpg --status-fd=2 --no-verbose --quiet --batch --output - --verify %s %f"
set pgp_verify_key_command="gpg --verbose --batch --fingerprint --check-sigs %r"
set print_command="enscript -Pkether/2 --margins=:::72 --header='Page $% of $='
set realname = "My Real Name"
set record="+sent-mail"
set signature="$HOME/.signatures/sign|"
set sort = threads
set sort_aux = last-date-received
set spool_file = allmail
set text_flowed=yes
Many thanks to anyone who can help!
Jake Wildstrom (61 rep)
May 15, 2023, 04:47 PM
1 votes
0 answers
90 views
gmail rejecting (postfix) .forwarded messages
For 15 years I've been forwarding email from my lab's mail server to gmail using a .forward file that has nothing but a single line containing my gmail address, and it has worked fine until recently. Suddenly gmail is (sometimes) rejecting mail people send me because it fails an SPF check. I checked...
For 15 years I've been forwarding email from my lab's mail server to gmail using a .forward file that has nothing but a single line containing my gmail address, and it has worked fine until recently. Suddenly gmail is (sometimes) rejecting mail people send me because it fails an SPF check. I checked the mail headers and something really strange seems to be happening. Google is treating my lab's server as if it's trying to send email from the sender's domain. For example, here is part of a header that shows up when I send an email from my yahoo account to my lab's account: spf=neutral (google.com: \ is neither permitted nor denied by domain of pat_morin@yahoo.com (Here, \ is the IPv4 address of my server that I don't want to post.) To me this suggests that gmail thinks \ is trying to pretend to be sending email from a yahoo.com address, which it's not. It's just forwarding it, which is clear from the headers. Does anyone have any idea why this is happening?
Pat Morin (111 rep)
Nov 16, 2022, 03:40 PM
3 votes
2 answers
1296 views
Evolution fails to connect to my Google calendar
I've configured 2-Step Verification with my Google accont (under https://myaccount.google.com/security). Emails with OAuth 2 seem to come through fine but I keep getting "Failed to connect calendar “my.mail@gmail.com : MyName” Data source “MyName” does not support OAuth 2.0 authentication and Failed...
I've configured 2-Step Verification with my Google accont (under https://myaccount.google.com/security) . Emails with OAuth 2 seem to come through fine but I keep getting "Failed to connect calendar “my.mail@gmail.com : MyName” Data source “MyName” does not support OAuth 2.0 authentication and Failed to connect address book “my.mail@gmail.com : Contacts” why is this and how can I fix that? I'm using Evolution 3.34.1
stdcerr (2099 rep)
Nov 16, 2019, 01:45 AM • Last activity: Nov 4, 2022, 09:16 AM
0 votes
1 answers
43 views
Postfix Server not accepted by Gmail
I have been sending emails from my server for 3 years now all of a sudden the emails bounce when sent to a gmail address - all other addresses are fine - I do not have a rDNS - my score with mailtester is 8.9
I have been sending emails from my server for 3 years now all of a sudden the emails bounce when sent to a gmail address - all other addresses are fine - I do not have a rDNS - my score with mailtester is 8.9
Karl (1 rep)
Sep 21, 2022, 07:37 PM • Last activity: Sep 23, 2022, 08:49 AM
1 votes
1 answers
1207 views
gmail sendgmail configuration for git send-email
[From May 30, 2022][1]: > Google no longer supports the use of third-party apps or devices which ask you to sign in to your Google Account using only your username and password. This is a problem for various applications including [`git send-email`][2]. [`sendgmail`][3] is tool from Google written i...
From May 30, 2022 : > Google no longer supports the use of third-party apps or devices which ask you to sign in to your Google Account using only your username and password. This is a problem for various applications including git send-email . sendgmail is tool from Google written in go which allows to use OAuth2 credentials. Using sendgmail requires certain configuration in Google Cloud , download JSON with configuration and rename to ~/.sendgmail.json and then run once: $ GOPATH/bin/sendgmail -sender=USERNAME@gmail.com -setup 1. Ensure that you are logged in as USERNAME@gmail.com in your browser. 2. Open the following link and authorise sendgmail: https://accounts.google.com/o/oauth2/auth ?... 3. Enter the authorisation code: My ~/.sendgmail.json contains redirect_uris":["http://localhost"], therefore clicked website is redirected to localhost (no webserver is on my machine) and I don't get the authorisation code. Could anybody explain what exactly to do in Google Cloud setup to get it working?
pevik (1587 rep)
Jun 8, 2022, 07:12 AM • Last activity: Jun 16, 2022, 10:02 AM
1 votes
1 answers
326 views
alpine email client 2.22 gmail error BAD Client aborted AUTHENTICATE command
I'm on ubuntu 20.04 and use alpine as my email client for gmail. About a week ago I had to change the authentication method from user-password to xoauth2 due to gmail disabling secure apps (meaning I have to set up an id and secret). This worked fine till today when I got this error message: ``` IMA...
I'm on ubuntu 20.04 and use alpine as my email client for gmail. About a week ago I had to change the authentication method from user-password to xoauth2 due to gmail disabling secure apps (meaning I have to set up an id and secret). This worked fine till today when I got this error message:
IMAP protocol error: Client aborted AUTHENTICATE command.
Runing alpine with debug options give me this:
02:54:10.270683
 609   │ IMAP DEBUG 02:54:10.270683: * OK Gimap ready for requests from 200.126.96.24 f10mb126061768oov
 610   │ 
 611   │ 02:54:10.270814
 612   │ IMAP DEBUG 02:54:10.270814: 00000000 CAPABILITY
 613   │ 
 614   │ 02:54:10.399210
 615   │ IMAP DEBUG 02:54:10.399210: * CAPABILITY IMAP4rev1 UNSELECT IDLE NAMESPACE QUOTA ID XLIST CHILDREN X-GM-EXT-1 
       │ XYZZY SASL-IR AUTH=XOAUTH2 AUTH=PLAIN AUTH=PLAIN-CLIENTTOKEN AUTH=OAUTHBEARER AUTH=XOAUTH
 616   │ 
 617   │ 02:54:10.399329
 618   │ IMAP DEBUG 02:54:10.399329: 00000000 OK Thats all she wrote! f10mb126061768oov
 619   │ 
 620   │ 02:54:10.399947
 621   │ IMAP DEBUG 02:54:10.399947: 00000001 AUTHENTICATE XOAUTH2
 622   │ 
 623   │ 02:54:10.529686
 624   │ IMAP DEBUG 02:54:10.529686: + 
 625   │ 
 626   │ 02:54:16.085145
 627   │ IMAP DEBUG 02:54:16.085145: *
 628   │ 
 629   │ 02:54:16.215203
 630   │ IMAP DEBUG 02:54:16.215203: 00000001 BAD Client aborted AUTHENTICATE command. f10mb126061768oov
 631   │ 
 632   │ 02:54:16.215320
 633   │ IMAP DEBUG 02:54:16.215320: 00000002 LOGOUT
 634   │ 
 635   │ 02:54:16.345417
 636   │ IMAP DEBUG 02:54:16.345417: * BYE Logout Requested f10mb126061768oov
 637   │ 
 638   │ 02:54:16.345567
 639   │ IMAP DEBUG 02:54:16.345567: 00000002 OK Quoth the raven, nevermore... f10mb126061768oov
Looking around in google haven't give me any hints so far as to what the issue can be. Also, I can't access alpine site (https://alpine.x10host.com/) . The important stuff of .pinerc are:
smtp-server : smtp.gmail.com:465/ssl/auth=xoauth2/user=user@gmail.com
           inbox-path : {imap.gmail.com:993/ssl/auth=xoauth2/user=user@gmail.com}INBOX
     postponed-folder : {imap.gmail.com:993/ssl/auth=xoauth2/user=user@gmail.com}[GMAIL]/Drafts
I also tried the smtp-server with tls and port 587. EDIT: Kind of testing out, I deleted .pine-passfile to do the authorization again. That worked, meaning I can access gmail now, but I have to re-do the whole process every time since there is no .pine-passfile created now.... Any ideas?
kurokirasama (303 rep)
Jun 15, 2022, 01:12 PM • Last activity: Jun 16, 2022, 05:46 AM
2 votes
1 answers
1900 views
gmail + mutt + isync: how to archive and delete mail
I want to switch from Thunderbird to (Neo)mutt, because I would like to read my mail in a terminal (offline). I have a gmail account and just can't figure out how to setup Mutt properly. I have setup isync in a way that syncs: - gmail's "Inbox" to a local "Inbox" folder - "[Gmail]/All Mail" to a loc...
I want to switch from Thunderbird to (Neo)mutt, because I would like to read my mail in a terminal (offline). I have a gmail account and just can't figure out how to setup Mutt properly. I have setup isync in a way that syncs: - gmail's "Inbox" to a local "Inbox" folder - "[Gmail]/All Mail" to a local "Archive" folder and - "[Gmail]/Trash" to a local "Trash" folder This seems to work. I usually read my email in the local Inbox and want to keep it clean. After reading a message, I want to either archive it or delete it. And I would like to have a simple keybinding for each of these two actions. So for example: - pressing "A" should remove a message from the inbox, but leave it in my archive - pressing "D" should remove a message from the inbox and from the archive, but should put in Trash Deleting a message from Trash should permanently delete a message. And of course this should be reflected in gmails web application and on my android phone. The following lines are in my neomuttrc file.
set mbox   = "+archive"
set trash  = "+trash"
unset move
bind index D delete-message
bind index A purge-message
Now, when archiving a message with "A", it's marked as deleted in my inbox in Neomutt and after syncing the mailbox and running isync the message also disappears from my Inbox in Thunderbird, but I can still see it in the inbox in gmails web app and in the inbox on my phone. I don't understand way. Any ideas? Deleting from my Inbox in Mutt seems to work (it just needs two runs of isync, which I do understand). But deleting messages from Trash in Mutt, does not delete these message from the Trash in the web app or on my phone. I don't get that either. Again, any ideas? Well, any help is highly appreciated. Thanks in advance!
schuam (68 rep)
May 18, 2021, 05:25 PM • Last activity: Feb 17, 2022, 02:51 PM
3 votes
2 answers
24886 views
Problem sending email using ssmtp
I am attempting to setup so I can mail from Raspbian. When I attempt to send I get an error `ssmtp: Cannot open smtp.gmail.com:587` (I also tried port:465) I have set "Access for less secure apps" on Google and can send/receive from the account on Thunderbird. I have installed `ssmtp` and configured...
I am attempting to setup so I can mail from Raspbian. When I attempt to send I get an error ssmtp: Cannot open smtp.gmail.com:587 (I also tried port:465) I have set "Access for less secure apps" on Google and can send/receive from the account on Thunderbird. I have installed ssmtp and configured /etc/ssmtp/ssmtp.conf to contain:- # Config file for sSMTP sendmail # # The person who gets all mail for userids < 1000 # Make this empty to disable rewriting. root=xxxxxx.raspberry.pi@gmail.com # The place where the mail goes. The actual machine name is required no # MX records are consulted. Commonly mailhosts are named mail.domain.com mailhub=smtp.gmail.com:587 AuthUser=xxxxxx.raspberry.pi@gmail.com AuthPass=xxxxxxxxxxxxxx UseTLS=YES UseSTARTTLS=YES # Where will the mail seem to come from? rewriteDomain=gmail.com # The full hostname hostname=xxxxxx.raspberry.pi@gmail.com # Are users allowed to set their own From: address? # YES - Allow the user to specify their own From: address # NO - Use the system generated From: address FromLineOverride=YES I have also configured /etc/ssmtp/revaliases to contain:- # sSMTP aliases # # Format: local_account:outgoing_address:mailhub # # Example: root:your_login@your.domain:mailhub.your.domain[:port] # where [:port] is an optional port number that defaults to 25. root:xxxxxx.raspberry.pi@gmail.com:smtp.gmail.com:587 Any suggestions? ---------- Edit The settings above based on https://wiki.archlinux.org/index.php/SSMTP I have done some further testing. 1. I selected a different SMTP server, which worked. (I do not want to use this, as it is only available when directly connected to my ISP.) 2. I tried setting an Application Specific password, and got the response"The setting you are looking for is not available for your account". (Presumably because this account does not have 2-factor authentication.) The gmail account I am trying to use was specifically created to send messages from the Raspberry Pi.
Milliways (1408 rep)
Apr 19, 2017, 07:41 AM • Last activity: Feb 11, 2022, 04:04 AM
8 votes
1 answers
1608 views
Can msmtp rewrite addresses?
I am trying to get all my system emails to be forwarded to my gmail address, using `msmtp 1.8.3` and `/etc/aliases` on debian. It works, but I get errors from gmail. When I email `root` (via `echo "hello world" | mail -s "forward me" root`), I obtain 2 emails in the inbox of the gmail address: 1. Th...
I am trying to get all my system emails to be forwarded to my gmail address, using msmtp 1.8.3 and /etc/aliases on debian. It works, but I get errors from gmail. When I email root (via echo "hello world" | mail -s "forward me" root), I obtain 2 emails in the inbox of the gmail address: 1. The expected forwarded email 2. The following message from mailer-daemon@googlemail.com
Address not found
Your message wasn't delivered to root@backupbox because the domain backupbox couldn't be found. Check for typos or unnecessary spaces and try again.
The response was:

DNS Error: 5452395 DNS type 'mx' lookup of backupbox responded with code NXDOMAIN Domain name not found: backupbox
Obviously, it is not surprising that gmail cannot reach root@backupbox, since from their perspective, backupbox is not a fully qualified domain name. I am however surprised, because I aliased all my system addresses to my gmail address. Here is my msmtp configuration: # /etc/msmtprc defaults port 587 tls on tls_trust_file /etc/ssl/certs/ca-certificates.crt account gmail host smtp.gmail.com from me@gmail.com auth on user me password xxxxxxxxxxxxxxxx account default : gmail aliases /etc/aliases Here are my system aliases # /etc/aliases default: me+backupbox@gmail.com How do I make sure that only the first email reaches me? For example, can msmtp rewrite root@backupbox as me@gmail.com?
user48678 (209 rep)
Dec 5, 2019, 10:55 PM • Last activity: Sep 16, 2021, 11:22 AM
0 votes
1 answers
529 views
systemd (OnFailure) using ssmtp with gmail can't send mail
Some important service: [Unit] ... OnFailure=status-email@%n.service ```status-email@.service```: [Unit] Description=status email for %i to user [Service] Type=oneshot ExecStart=/usr/local/bin/systemd-email.sh %i User=root Group=systemd-journal [Install] WantedBy=multi-user.target I'm getting error...
Some important service: [Unit] ... OnFailure=status-email@%n.service
-email@.service
: [Unit] Description=status email for %i to user [Service] Type=oneshot ExecStart=/usr/local/bin/systemd-email.sh %i User=root Group=systemd-journal [Install] WantedBy=multi-user.target I'm getting error
-email.sh: ssmtp: Cannot open smtp.gmail.com:587
I can send mail manually
./systemd-email.sh $RECIPIENT $SERVICE_NAME
It's also working as cronjob. My
/etc/ssmtp/ssmtp.conf
: root= mailhub=smtp.gmail.com:465 FromLineOverride=YES AuthUser= AuthPass= UseTLS=YES Why cron can send mail in this setup but systemd cannot?
Xeicam (1 rep)
Jul 25, 2021, 10:33 PM • Last activity: Jul 26, 2021, 01:08 PM
0 votes
1 answers
325 views
Help unsubscribing from Debian mailing lists
Apologies if this is not the right place to ask. My email address is "myname@gmail.com", but I subscribed (to several [Debian mailing lists][1]) with the email "myname+web@gmail.com" (I'm 99% sure). I think because of the "+ trick", the system fail to unsubscribe me. I've tried the [unsubscription f...
Apologies if this is not the right place to ask. My email address is "myname@gmail.com", but I subscribed (to several Debian mailing lists ) with the email "myname+web@gmail.com" (I'm 99% sure). I think because of the "+ trick", the system fail to unsubscribe me. I've tried the unsubscription forms and the alternative methods but nothing worked. I didn't find an email contact to write to either. What should I do?
Seub (172 rep)
Jun 19, 2021, 12:24 PM • Last activity: Jun 19, 2021, 12:37 PM
Showing page 1 of 20 total questions