GithubHelp home page GithubHelp logo

deanproxy / email Goto Github PK

View Code? Open in Web Editor NEW
136.0 14.0 46.0 225 KB

Command line SMTP client

Home Page: https://www.deanproxy.com/code

License: GNU General Public License v2.0

Shell 8.26% Standard ML 0.06% C 87.38% Makefile 1.41% M4 1.88% C++ 1.02%

email's Introduction

This will explain the email program as well as it can.

First thing is first. This file will take place as sort of a FAQ sheet, because I already know what questions will be asked.

Q: How do I checkout the source from github and get everything I need?

A: Type the following in a shell:

    git clone --recursive [email protected]:deanproxy/eMail.git

Q: What is eMail ?

A: eMail is a program I designed that will send email via the command line to remote smtp servers or use 'sendmail' internally, and fully interact with GNUPG to encrypt and sign your e-mails, so you decide to do so... You can get GNUPG at: http://www.gnupg.org


Q: How do I compile and Install this thing?

A: Just do this as root:

./configure
make
make install

If you want to use system dlib from e.g. /usr/include/dlib, then run ./configure --with-system-dlib.


Q: Where is it installed?

A: the executable is called 'email' and is installed in a directory that is under the prefix or bindir specified during the ./configure of email. If you choose to specify a prefix during configure, it will go under $bindir. Which, by default, is an offset of $prefix/bin. If you specify --bindir then the binary will be put in $bindir.

If you do not specify a directory prefix during configure, then it will go under /usr/local/bin/email. The configuration files are installed by default in /usr/local/etc/email. However, if you specify the --sysconfdir option during ./configure, then the configuration files will go in $sysconfdir. Please view ./configure --help


Q: How do I make your freakin' program work?

A: Well, first thing you should do, is configure this email client. You will have the configuration file in /usr/local/etc/email/email.conf Some less important options are not set (address_book, save_sent_mail, temp_dir reply_to, signature_file, signature_divide) but you can easily set these by hand and they are not needed to properly run email.

You will see it has a few options you must set to your environment.

SMTP_SERVER: Please specify your smtp server name, or IP address here

SMTP_PORT: Please specify your smtp servers port number for use

MY_NAME: Please specify your Name here

MY_EMAIL: Please specify your email address here

REPLY_TO: Specify a seperate reply to address here

SIGNATURE_FILE: Specify your signature file

ADDRESS_BOOK: Where to find your address book file

SAVE_SENT_MAIL: What directory to save the email.sent file to

TEMP_DIR: Specify where to store temporary files

GPG_BIN: Specify where the gpg binary is located.

GPG_PASS: Optional passphrase for gpg.

SMTP_AUTH: LOGIN or PLAIN are supported SMTP AUTH types

SMTP_AUTH_USER: Your SMTP AUTH username

SMTP_AUTH_PASS: Your SMTP AUTH Password

USE_TLS: Boolean (true/false) to use TLS/SSL

VCARD: Specify a vcard to attach to each message

SMTP_SERVER can be either a remote SMTP servers fully qualified domain name, or an IP address. You may also opt to use sendmail internally instead of sending via remote SMTP servers. To do this you just put the path to the sendmail binary and any options you would like to use with sendmail (Use -t) in the place of the smtp server name... HINT: If you would like to send emails to people on your local box (i.e. djones@localhost ), then you must use the sendmail binary.

When you are specifying file paths, you can use the tilde wildcard as you could in the shell to specify your home directory. Example: ~/.email.conf would mean /home/user/.email.conf to the email program.

Once you are done here, you can leave your email in /usr/local/etc/email/email.conf or the directory you specified during the configure with --sysconfdir=... for a global configuration, or in your local home directory as ~/.email.conf for a personal configuration. Personal configs override global configs.

You can get online help by using the --help option with email and specifying the command line option you need help with. Example: email --help encrypt

If you use the -encrypt or -sign option, you MUST have GNUPG installed on your system. email uses gpg to encrypt the email to the FIRST email recipient

Example:

email -s "This is the subject" -encrypt [email protected]

In that example, I would be sending the email to [email protected] and gpg would encrypt it with the key of [email protected]

You can use -high-priority ( or -o ) to send your message in a high priority matter. In MS Outlook you will see a little ! mark next to the letter so that the recipient will see that the message is high priority!

You can send a message in one of two ways: The first way is to already have a message ready to send. Say if I have a file named this.txt and I want to send it to [email protected]. I can redirect this file to the email program in one of two ways.

Example below:

cat this.txt | email -s "Sending this.txt to you" [email protected]

or

email -s "Sending this.txt to you" [email protected] < this.txt

If you want to create a message, you will need to do two things here.

First set the environment variable "EDITOR" to your favorite editor.

Example:

export EDITOR=vi

Please use your favorite editor in place of vi.

Now all you have to do is execute the example below:

Example:

email -s "Subject" [email protected]

This will open up your favorite editor and let you write a email to [email protected] email will default to vi if you do not set EDITOR.

You can send to multiple recipients with email. All you have to do is put commas between the email addresses you want the message to be sent to.

Example below:

Here are some more examples below:

Example: the below command will send a message that is encrypted with [email protected] key

email -s "my email to you" -encrypt [email protected],[email protected]

Example: the example will sign the message directed to it.

email -s "signed message" -sign [email protected] < secret_stuff.txt

Example: This will send to multiple recipients

Example: Set message to high priority

email -s "High priority email" -high-priority [email protected]

Example: Send message with 2 attachements

email -s "here you go..." -attach file -attach file2 [email protected]

Example: Add headers to the message

email -s "New Message" --header "X-My-Header: Stuff" \ --header "X-Another-Header: More Stuff" [email protected]

Q: Do you allow signatures?

A: Yes, we do.

Look in email.conf and edit the signature variables as needed.

If you're wondering what a signature divider is, it's the little thingy that divides your email message from the signature.

Usually it's '---' (Default)

Also, you can specify wild cards in the signature file.

%c = Formated time, date, timezone ( looks like the output of 'date' )
%t = Time only ( US Standard format )
%d = Date Only ( US Standard format )
%v = Version ( For us folks who want to endorse 'email' )
%h = Host type (ex. Linux 2.2.19 i686 )
%f = Prints output from the 'fortune(6)' command
%% = Prints a % mark

Your sig could look like this:

---
This message was sent: %c

This would end up looking like: 
This message was sent: Thu Dec 13 04:54:52 PM EST 2001

Q: How does the address Book work?

A: Set up your email.conf file to point to your very own address book.

There is a template in the email source directory that you can view to set up your own address book. The format should be as below:

Any single name to email translation will have to have a 'single:' token before it:

single: Software    = [email protected]
single: Dean        = [email protected]
single: "Full Name" = [email protected]

Any group name to email translation will have to have a 'group:' token before it:

With groups, you can only use the Names of your single statements above... Format below:

  group: Both = Software,Dean

See the email.address.template file for more information


Q: Do you allow attachments?

A: YES! We now support attachments with email!

Simply specify the files you want attached to your email by specifying the --attach option, with a list of files delemited by commas. All files will be encoded with base64 and attached with the appropriate MIME headings.

Example:

email -s Attachment --attach file [email protected]

# Multiple files

email -s Attachments --attach file1 --attach file2 [email protected]

Q: Do you allow SMTP AUTH?

A: Yes! Email does SMTP AUTH. You will need to set a few options in the email.conf file. SMTP_AUTH, SMTP_AUTH_USER and SMTP_AUTH_PASS. If you want to know more about this, please view the email manual page 'man email'.


Q: Can I join the development team?

A: Yes, send an email at http://deanproxy.com/contact/ and ask how, or just clone it with git (see above on how to do that) and start coding and committing!


Q: Why email?

A: Because 'mailx' won't send to remote smtp servers and I didn't have access to sendmail.

I needed something that would communicate with Remote smtp servers and encrypt my messages on the fly instead of taking numerous steps to do so.


Q: What does 'email' stand for?

A: Well, despite popular belief, it stands for "Encrypted Mail" Not "Electronic Mail"

My initial purpose was to make e-mail easier to send via command line and encrypt it with out taking all the damn steps 'mailx' makes you take! Sorry mailx!


Q: Who are the developers?

A: Dean Jones - Main developer

http://deanproxy.com/contact/

That's about it so far. I hope you like the program eMail.

If you have any questions, bugs, or concerns please use:

https://github.com/deanproxy/eMail/issues

email's People

Contributors

bigml avatar bryant1410 avatar c00kiemon5ter avatar cioban avatar cjmayo avatar deanproxy avatar gapan avatar iav avatar jerith666 avatar mikhailnov avatar physicalit avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

email's Issues

command not found after install

Hi there :)

I have downloaded and configured the tool with succes. I then try with "make" but that results in "makefile:26: recipe fore target 'all' failed" - if i do a make install, that seems to work! - but when i want to use the email --help i get an bash: command not found..

i have also configured the email.conf file in /usr/local/etc/email - with my smtp2go credentials...

What do i have to do in order to get this working..?

  • Zormgard

Connecting to mail server, then no traffic?

Using 3.2.3 (on Cygwin) I can successfully connect to my mail server, but then it times out:
$ echo hello | email -V -f -n "name" -s "subject" -r smtp.xx.net -p 465 -tls -m LOGIN -u -i
Connecting to server smtp.xx.net on port 465
Init connection...
email: FATAL: Smtp error: Timeout(10) while trying to read from SMTP server

Watching wireshark, I see the connection is being made. With my gui client (Thunderbird), in wireshark I see the connection being made, then a TLS 1.2 Client Hello. email doesn't send the Client Hello.

I see the issue saying email only supports TLS 1.0 - is that still the case?

compiler error - opensuse

lot of things like this during linking step:

/usr/lib64/gcc/x86_64-suse-linux/12/../../../../x86_64-suse-linux/bin/ld: remotesmtp.o:/dare/sys_libs_experimental/eMail/include/email.h:81: multiple definition of `Mopts'; email.o:/dare/sys_libs_experimental/eMail/src/email.c:45: first defined here

Following patch fixes it for me:

commit 3ccc3f0fe865d7c7c4be1779116e98f8476d50da
Author: Anton Sharonov <[email protected]>
Date:   Thu Mar 16 10:45:13 2023 +0100

    Make eMail compilable

diff --git a/include/email.h b/include/email.h
index 5800265..7a73533 100644
--- a/include/email.h
+++ b/include/email.h
@@ -61,8 +61,8 @@ typedef enum { GPG_SIG=0x01, GPG_ENC=0x02 } GpgCallType;
 
 
 /* Globally defined vars */
-dhash table;
-char *conf_file;
+extern dhash table;
+extern char *conf_file;
 
 struct mailer_options {
 	bool verbose;
@@ -78,7 +78,9 @@ struct mailer_options {
 	dlist to;
 	dlist cc;
 	dlist bcc;
-} Mopts;
+} ;
+
+extern struct mailer_options Mopts;
 
 void usage(void);
 
diff --git a/src/email.c b/src/email.c
index 524e9be..1966648 100644
--- a/src/email.c
+++ b/src/email.c
@@ -40,6 +40,10 @@
 #include "error.h"
 #include "mimeutils.h"
 
+dhash table;
+char *conf_file;
+struct mailer_options Mopts;
+
 static void
 defaultDestr(void *ptr)
 {

Do not overwrite the configuration file?

I just discovered that two of our Windows hosts, hosts that had their Cygwin stuff updated recently, had their '/etc/email/email.conf' overwritten, apparently by the update that was applied. Nothing else touches it. Our own config could be restored from the backup, but ... it is something that should never, ever happen?

Could you take special care not to do this, please? Thanks!

error: You MUST specify the --version flag

Dean,

http://www.cleancode.org/projects/email states:

git clone --recursive https://github.com/deanproxy/eMail.git
cd eMail
./configure
make
make install

should work, but on Ubuntu 12.10, make install reports:

./install.sh --bindir "/usr/local/bin" --sysconfdir "/usr/local/etc" \
                --mandir "/usr/local/share/man" --binext "" --version "" \
        --docdir "/usr/local/share/doc/"
error: You MUST specify the --version flag
make: *** [install] Error 2`

If I install from http://www.cleancode.org/downloads/email/email-3.1.3.tar.gz , I do not have this issue.

Best,

Ross

Body is empty

Hi, I can send email fine but the body is empty. Here's the command I'm using:
cat 'test1' | email -s "test2" [email protected]

I received the email with a subject test2 but the body is empty.

Rework GPG use. Seems to be buggy at best...

Had some comments about signing and encrypting e-mails not working or signing with incorrect email address. An email from an anonymous user:

I'm having a problem signing emails. I'm using the latest cygwin x86_64 and I've installed gnupg v1.4.13 and email v3.1.2. When I run email -sign -V [email protected], I get the following:

Subject: test of signed email
Please enter your GPG password:
gpg: skipped "[email protected]": secret key not available
gpg: signing failed: secret key not available
Connecting to server smtp-server.twcny.rr.com on port 25
Sending "test of signed email" |**************************| 100% of 896 Bytes
Sending QUIT...

My response was:

It appears it's trying to sign the e-mail based off the first e-mail address in your To list as opposed to your e-mail address from your email.conf file.

I'll be honest, the gpg code for this hasn't been touched in years, so I'm sure something is buggy with it and hasn't been caught up until now. I've been looking at the code for a few minutes and I see what's wrong, but I think it's going to take a bit longer for me to fix the issue.

./configure fails

./configure terminates with
./configure: line 6700: ./configure: No such file or directory
on the following system:
Linux STOC-19x 4.4.0-28-generic #47~14.04.1-Ubuntu SMP Fri Jun 24 16:30:35 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
What am I missing?
Thanks
Kevin

ADDRESS_BOOK (2 issues)

Freshly download, configure, make eMail (no package): email does not run out-of-the-box with the given sample file email.conf because it refers to ADDRESS_BOOK = '&/email.address.template' which does not exist.
I suggest to uncomment the config option in the sample file.

Also I suggest to not let it refer to '&' because address books are typically personal data.

(Furthermore, I didn't check this, but if there is a common address book format compatible with several mail clients, it would be appreciable if email supports it too.)

Proposal:

ADDRESS_BOOK = '~/.addressbook'

How to compile in Ubuntu 20.04 ?

Hi,
I tried to compile the latest source code under Ubuntu 20.04, but failed on running "./configure" command with below error:


checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.out
checking for suffix of executables...
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether we are using the GNU C compiler... yes
checking whether gcc accepts -g... yes
checking for gcc option to accept ISO C89... none needed
checking how to run the C preprocessor... gcc -E
checking for grep that handles long lines and -e... /bin/grep
checking for egrep... /bin/grep -E
checking for ANSI C header files... yes
checking for sys/types.h... yes
checking for sys/stat.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for memory.h... yes
checking for strings.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for unistd.h... yes
checking minix/config.h usability... no
checking minix/config.h presence... no
checking for minix/config.h... no
checking whether it is safe to define EXTENSIONS... yes
checking for gcc... (cached) gcc
checking whether we are using the GNU C compiler... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to accept ISO C89... (cached) none needed
checking whether make sets $(MAKE)... yes
checking for special C compiler options needed for large files... no
checking for _FILE_OFFSET_BITS value needed for large files... no
checking for library containing socket... none required
checking for library containing sqrt... -lm
checking for library containing gethostbyname... none required
checking for library containing X509_free... no
checking for library containing RAND_seed... no
checking openssl/crypto.h usability... no
checking openssl/crypto.h presence... no
checking for openssl/crypto.h... no
checking openssl/x509.h usability... no
checking openssl/x509.h presence... no
checking for openssl/x509.h... no
checking openssl/pem.h usability... no
checking openssl/pem.h presence... no
checking for openssl/pem.h... no
checking openssl/ssl.h usability... no
checking openssl/ssl.h presence... no
checking for openssl/ssl.h... no
checking openssl/err.h usability... no
checking openssl/err.h presence... no
checking for openssl/err.h... no
checking for SSL_CTX_new in -lssl... no
-lm
checking for ANSI C header files... (cached) yes
checking for sys/wait.h that is POSIX.1 compatible... yes
checking arpa/inet.h usability... yes
checking arpa/inet.h presence... yes
checking for arpa/inet.h... yes
checking fcntl.h usability... yes
checking fcntl.h presence... yes
checking for fcntl.h... yes
checking libintl.h usability... yes
checking libintl.h presence... yes
checking for libintl.h... yes
checking netdb.h usability... yes
checking netdb.h presence... yes
checking for netdb.h... yes
checking netinet/in.h usability... yes
checking netinet/in.h presence... yes
checking for netinet/in.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for strings.h... (cached) yes
checking sys/ioctl.h usability... yes
checking sys/ioctl.h presence... yes
checking for sys/ioctl.h... yes
checking sys/socket.h usability... yes
checking sys/socket.h presence... yes
checking for sys/socket.h... yes
checking sys/time.h usability... yes
checking sys/time.h presence... yes
checking for sys/time.h... yes
checking termios.h usability... yes
checking termios.h presence... yes
checking for termios.h... yes
checking for unistd.h... (cached) yes
checking whether time.h and sys/time.h may both be included... yes
checking whether struct tm is in sys/time.h or time.h... time.h
checking for pid_t... yes
checking vfork.h usability... no
checking vfork.h presence... no
checking for vfork.h... no
checking for fork... yes
checking for vfork... yes
checking for working fork... yes
checking for working vfork... (cached) yes
checking whether gcc needs -traditional... no
checking for stdlib.h... (cached) yes
checking for GNU libc compatible malloc... yes
checking for stdlib.h... (cached) yes
checking for GNU libc compatible realloc... yes
checking return type of signal handlers... void
checking whether lstat correctly handles trailing slash... yes
checking whether stat accepts an empty string... no
checking for strftime... yes
checking for vprintf... yes
checking for _doprnt... no
checking for gethostbyname... yes
checking for gethostname... yes
checking for getpass... yes
checking for gettimeofday... yes
checking for memset... yes
checking for putenv... yes
checking for socket... yes
checking for sqrt... yes
checking for strcasecmp... yes
checking for strchr... yes
checking for strerror... yes
checking for strrchr... yes
checking for uname... yes
checking if strftime is GNU or Non-GNU... /tmp/strftime_try.c: In function 'main':
/tmp/strftime_try.c:16:8: warning: implicit declaration of function 'isdigit' [-Wimplicit-function-declaration]
16 | if (!isdigit(buf[1]))
| ^~~~~~~
GNU
configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating email.help
config.status: creating email.1
config.status: creating include/config.h
./configure: line 6701: ./configure: No such file or directory

Not sure which file is missing. Could anyone help to share some experience on compiling on Ubuntu 20.04 (x64)? Thanks in advance.

Signature specification

Configuration option SIGNATURE_FILE apparently provides no way to refer to my home directory; SIGNATURE_FILE = $HOME/.signature.email (or quoted) does not work.

Configuration option SIGNATURE_DIVIDE does not work; email says:
email: FATAL: Variable: '▒▒▒d' is not valid

email corrupts mail bodies

[I had reported this before @ http://www.cleancode.org/projects/email/contact but received no response so far]

One of my mails recently was cut off after a line containing a non-ASCII character and a final dot ("."). No idea how many other emails had been corrupted before as this happened silently.
Since this is a serious reliability issue I would ask for quick response and fix, please.

Sample mail body:
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxäxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxäxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxäxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxäxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxäxxxxxxxx
xxxxxxxxxxxxxxxxx.

xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxäxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.

xxxxxxxxxxxxxxxxxxxxxxxxx

xxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxäxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

xxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxx.x.xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxäxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

xxxxxxxxxxx
xxxäxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxäxxxxxxx
xxxxxxxxäxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxäxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxäxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

xxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

xxxxxxxxxxxxxxxxxxxxxxxxxxxxäxxxxxxxxxxxx.

xxxxxxxxxxxxxxxxx
xxxxxxxxxxxx

xxxxxxxx

xxxxxxxxxxxx
xxxxxxxxxxx

No content body when the email pass through an Exchange server

eMail works as expected pretty much everywhere except when one of the email relay is an exchange server.

As stated in RFC821: http://www.faqs.org/rfcs/rfc821.html
Each line in an email should end with a CRLF. eMail adds a \r\n at every end of line.

The \r is a Carriage return (CR):
http://en.wikipedia.org/wiki/Carriage_return

The \n is a Newline (LF):
https://en.wikipedia.org/wiki/Newline

As I understand, the \r adds a CR and the \n adds a LF so it should work but it doesn't. If you just use a simple \r it will work though.

Example of an email using "eMail" (note the double ^M):

To: [email protected]^M^M
Date: Tue, 05 May 2015 00:33:18 -0400^M^M
Mime-Version: 1.0^M^M
Content-Type: text/plain^M^M
X-Mailer: Cleancode.email v3.2.3-git ^M^M
^M^M
1^M^M
2^M^M
3^M^M
^M^M
^M^M
^M
^M

This email will be received just fine everywhere with the body content

1
2
3

However, there will be no body content if it passes through an Exchange server. I was able to fix the issue by replacing all references to \r\n to \n in those files:

file_io.c
message.c
mimeutils.c
smtpcommands.c
utils.c

Re-compile everything and this fix the issue, I can now see the body content.

email man page warnings

$ man email
Formatting page, please wait...
:67: warning: macro email.help'.' not defined (possibly missing space afterem')
:95: warning: macro URL' not defined (possibly missing space afterUR')
:352: warning: macro email'' not defined (possibly missing space afterem')

These do affect the content of the page too. Patch pasted below (don't think I can attach anything to this, hope it doesn't get mangled).

From 8c4ea00f653a21e2daef7e0bae4dea4c506355a5 Mon Sep 17 00:00:00 2001
From: Chris Mayo [email protected]
Date: Sun, 16 Oct 2011 12:14:31 +0100
Subject: [PATCH] Fix manual page warnings


email.1.in | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/email.1.in b/email.1.in
index 0f46a8d..4669047 100644
--- a/email.1.in
+++ b/email.1.in
@@ -63,7 +63,7 @@ help section.

The Help is not statically programmed into email.
Instead it is a file in email's home directory called
-'email.help'. It is updated regularly and will always
+&'email.help'. It is updated regularly and will always
be rewritten with every release of email.

.TP
@@ -91,7 +91,8 @@ subjects are allowed.
.B --encrypt | -encrypt | -e
This options allows you to encrypt your email message
using 'gpg'. GPG can be obtained by going to:
-.URL http://www.gnupg.org.
+.UR http://www.gnupg.org
+.UE .
When this option is specified, it will get the first
recipient from the recipient list and it will encrypt
the message using their key. This key MUST be present
@@ -348,7 +349,7 @@ this variable is not set, it will default to vi.
TMPDIR can be set to specify a temporary directory to
place your temp files while email is working. This is
analogous to the TEMP_DIR variable in email.conf.
-'email' will check TEMP_DIR first, then check your
+&'email' will check TEMP_DIR first, then check your
environment variable TMPDIR for a temporary directory.
If neither contains a value, email defaults to /tmp.

1.7.6.1

Compile/link error - multiple definitions of Mops, table, conf_file

I get this error (from the linker) when compiling (Slackware 15 and/or Void Linux)

/usr/bin/ld: addr_parse.o:/home/chris/eMail/include/email.h:81: multiple definition of Mopts'; email.o:/home/chris/eMail/include/email.h:81: first defined here /usr/bin/ld: addr_parse.o:/home/chris/eMail/include/email.h:65: multiple definition of conf_file'; email.o:/home/chris/eMail/include/email.h:65: first defined here
/usr/bin/ld: addr_parse.o:/home/chris/eMail/include/email.h:64: multiple definition of `table'; email.o:/home/chris/eMail/include/email.h:64: first defined here

This repeats for all the .o files
Anything I can do? See attached for configure and make.
Cheers
make-errors.txt

Multiple definitions failure

After ./configure, need to add -z muldefs to LDFLAGS in src/Makefile to stop errors due to multiple definitions of Mopts etc.

Timezone

Hi,
How can I change timezone¿? My emails are send (or received) +8 hours that present time.
Thanx

TLS is fixed at version 1.0 only

With the TLS option, email supports only TLSv1.0, which is either obsolete, or rapidly becoming obsolete, depending on your point of view.

Looks like in dlib, around line 175 of dnet.c, is where TLSv1.0 is hardcoded in.

Would be awesome if instead you tried, in priority order, TLSv1.2, TLSv1.1, TLSv1.0.

Failure on configure

Hi,

I downloaded the master code, and just run "./configure" and it fails as below:

......
_configure: creating ./config.status
config.status: creating Makefile
config.status: creating src/Makefile
config.status: creating email.help
config.status: creating email.1
config.status: creating include/config.h
./configure: line 6740: ./configure: No such file or directory

I checked the "configure" code, and its last three lines are:

cd dlib
./configure $args --host=$host_alias
cd ..

So it tried to run "configure" command in "dlib" folder and coudn't find the "configure" file.

It's the code issue, or I missed any step for running "configure"?
Thanks in advance for any hint.

Multiple email.conf configurations

How would I use multiple configurations for email.conf for several different smtp servers ? Can this be set on the command line when sending an email, or is it in configuration somewhere ?

Thanks

Cross-compilation broken when building dlib

The host alias information is not passed to dlib's configure script. This needs to be done so that the resulting objects can be linked into email:

diff --git a/configure.in.dist b/configure.in.dist
index 91ad006..3d5c840 100644
--- a/configure.in.dist
+++ b/configure.in.dist
@@ -80,5 +80,5 @@ if test "$use_ssl" = "no"; then
args="--without-ssl"
fi
cd dlib
-./configure $args
+./configure $args --host=$host_alias
cd ..

Compiling Error

On my system Ubuntu 22.04.1 LTS running 5.15.0-1028-aws I am getting the following error while running ./configure

checking if strftime is GNU or Non-GNU... /tmp/strftime_try.c: In function 'main':
/tmp/strftime_try.c:16:8: warning: implicit declaration of function 'isdigit' [-Wimplicit-function-declaration]
16 | if (!isdigit(buf[1]))
| ^~~~~~~
/tmp/strftime_try.c:5:1: note: include '<ctype.h>' or provide a declaration of 'isdigit'
4 | #include <sys/time.h>
+++ |+#include <ctype.h>
5 |
GNU

uabble to install eMail getting error

Hi,
I taken clone for eMail and trying to run ** ./configure** from inside eMail folder but getting following error
checking if strftime is GNU or Non-GNU... /tmp/strftime_try.c: In function 'main':
/tmp/strftime_try.c:16:8: warning: implicit declaration of function 'isdigit' [-Wimplicit-function-declaration]
if (!isdigit(buf[1]))
^~~~~~~

screenshot_2018-07-20_13-13-01

Bad exit code

When the program can't send an email and prints a fatal error message on stderr
(Some of the reasons : can't connect to the SMTP server, timeout, ...)
It should return an error code but despite those error messages, it returns 0.

Cygwin off by hour timestamp

Due to comments from users, it appears that timestamps for the sent header may be off by 1 hour using the email binary for cygwin. Here is an e-mail from an anonymous user:

Hello Dean,
I found a small issue when using your email program in Cygwin. The 'sent' date in received email always shows one hour late than the actual system time. For example, I sent an email at 10am by email command line in Cygwin. the 'sent' time is shown as 11am. I checked the windows system time and Cygwin timezone and time(date command), they are all correct. Can you tell me if it's a bug?

Make sure quoted printable is working as expected

Message from user:

If period character (dot .) is 1st character in a line, it should insert another period character after it.

When I send mail which contains IPv4 address, and receive it by another mail client, I found that sometimes one dot in IPv4 address is missing. I checked the quoted-printable string generated by email, and found the 1st character of one line is dot, it's eaten by maybe the smtp server of mail client.

example:

<span class=3D'A'>=E6=B7=BB=E3=80=80=E3=80=80=E5=8A=A0 <a href=3D'ht=
tp://192.168.105.26/svn/cmcc/config/trunk/192.168.115.88 RecordBackup01/etc=
/profile.d/env.sh'>=E9=93=BE=E6=8E=A52(=E6=94=AF=E6=8C=81=E6=B1=89=E5=AD=97=
) <a href=3D'http://192.168.105.26/viewvc/cmcc/config/trunk/192.168.115=
.88 RecordBackup01/etc/profile.d/env.sh'>config/trunk/192.168.115.88 Record=
Backup01/etc/profile.d/env.sh

Related RFC section:

http://tools.ietf.org/html/rfc2821#section-4.5.2

  • When a line of mail text is received by the SMTP server, it checks
    the line. If the line is composed of a single period, it is
    treated as the end of mail indicator. If the first character is a
    period and there are other characters on the line, the first
    character is deleted.

getting to work with gmail app code

getting error:

email: FATAL: Smtp error: 530 5.7.0 Must issue a STARTTLS command first. s31sm1331632ywa.30 - gsmtp

not sure where to add this:

props.put("mail.smtp.starttls.enable", "true");

Using TLS with email and GMX is broken since last week

Hi,

apparently GMX (a big German freemail provider) has changed their server settings and now sending mail with TLS encryption is broken in email:

email -V -c /etc/email/email.conf -no-encoding -tls -f [email protected] -s "subject" -r "mail.gmx.net" -p 587 -u "[email protected]" -i "password" "[email protected]" < /tmp/email.text
Connecting to server mail.gmx.net on port 587
Greeting the SMTP server...                                                                                                                                                                                                                  
email: FATAL: Smtp error: 503 Bad sequence of commands

It still works with kontact (KDE4) and claws-mail. Here is a claws-mail log:

* Konto: '[email protected]': Verbinden mit SMTP-Server: mail.gmx.net ...
[11:54:17] SMTP< 220 gmx.com (mrgmx001) Nemesis ESMTP Service ready
[11:54:17] ESMTP> EHLO stat3.localdomain
[11:54:17] ESMTP< 250-gmx.com Hello stat3.localdomain [87.ip.addr.ess]
[11:54:17] ESMTP< 250-SIZE 69920427
[11:54:17] ESMTP< 250-AUTH LOGIN PLAIN
[11:54:17] ESMTP< 250 STARTTLS
[11:54:17] ESMTP> STARTTLS
[11:54:17] ESMTP< 220 OK
[11:54:18] ESMTP> EHLO stat3.localdomain
[11:54:18] ESMTP< 250-gmx.com Hello stat3.localdomain [87.ip.addr.ess]
[11:54:18] ESMTP< 250-SIZE 69920427
[11:54:18] ESMTP< 250 AUTH LOGIN PLAIN
[11:54:18] ESMTP> AUTH LOGIN
[11:54:18] ESMTP< 334 XXXXXXXXXXXX
[11:54:18] ESMTP> [USERID]
[11:54:18] ESMTP< 334 XXXXXXXXXXXX
[11:54:18] ESMTP> [PASSWORD]
[11:54:18] ESMTP< 235 Authentication succeeded
[11:54:18] ESMTP> MAIL FROM:<[email protected]> SIZE=379
[11:54:18] SMTP< 250 Requested mail action okay, completed
[11:54:18] SMTP> RCPT TO:<[email protected]>
[11:54:18] SMTP< 250 OK
[11:54:18] SMTP> DATA
[11:54:18] SMTP< 354 Start mail input; end with <CRLF>.<CRLF>
[11:54:18] SMTP> . (EOM)
[11:54:18] SMTP< 250 Requested mail action okay, completed: id=0MGAdz-1V0PDZ12DH-XXXXX
* E-Mail erfolgreich gesendet.
[11:54:18] SMTP> QUIT
[11:54:18] SMTP< 221 gmx.com Service closing transmission channel

error: no acceptable C compiler found in $PATH

Hi,

I've been trying to use the configure script to configure eMail for some time without success. I can't get it to recognize any of the C compilers I have installed.

I'm using Windows 10. I have installed git-bash. I also have Cygwin64 and Visual Studio 2015 Enterprise installed,

I've installed gcc using cygwin64 (both the mingw version and regular gcc).

I generally try adding the path to a specific compiler to the front of my PATH environment variable

$ echo $PATH
/c/cygwin64/usr/x86_64-w64-mingw32/bin:/c/Users/echawkes/bin:/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/mingw64/bin:/usr/bin:/c/Users/echawkes/bin: ... (rest of path elided)

I always get a result like this in the git-bash shell, regardless of which compiler I try:

$ ./configure
checking for gcc... no
checking for cc... no
checking for cl.exe... no
configure: error: in /c/github.com/deanproxy/eMail.git/eMail': configure: error: no acceptable C compiler found in $PATH See config.log' for more details
./configure: line 38: sort: No such file or directory
./configure: line 35: sed: No such file or directory

I haven't used git-bash before today - I installed it for the purpose of installing eMail - so I'm not very familiar with it.

Any advice on how I can get set up to compile / configure eMail?

SSL/TLS problems.

Hi.

If I use port 25, I get this warning: "email: WARNING: No SSL support compiled in. Disabling TLS."
If I use port 465, I get this error: "email: FATAL: Smtp error: Timeout(10) while trying to read from SMTP server"
And if I use port 587, i get this error: "email: FATAL: Smtp error: 503 5.5.1 Error: authentication not enabled"

What can I do to avoid using port 25, and use port 465 or 587 instead?
and if that is not possible, what can I do to avoid the warning, when using port 25?

Hope someone can help with this problem

Unrecognized authentication type

I am trying to send email from email to an office365 mailbox but i keep getting

email: FATAL: Smtp error: 504 5.7.4 Unrecognized authentication type [SN1NAM02FT025.eop-nam02.prod.protection.outlook.com]

i have changed ports and smtp-auth from login to plain, but still no go.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.