Solved sending mail via mail / mailx

Hello my question is as follows I have the username sixpiece . I am trying to send an email from sixpiece using the command line and would like to know how to make it so that I can number 1 by default suppose I send an email as follows:

sixpiece : > mail someone@example.com
subject : whatever
message

EOF

now that it will authenticate on mail.kaufland.de using username and password and send as paul@kaufland.de

the second question which would be a follow up is suppose I have two emails: one is paul@kaufland.de and the second is paul.heitz@gmail.com now suppose I want to send the email from paul.heitz@gmail.com how can I make it so that this second email is sent as paul.heitz@gmail.com and authenticates properly with gmail at smtp.google.com with the appropriate login credentials to be able to send off an email to someone from paul.heitz@gmail.com ?

Thank you.

I am using freebsd 15, imap configuration, sendmail (proof point, community version generally part of the base system), fetchmail, mailx , mail, email, smtp

Note: I am only interested in technical responses to this matter, social type questions (ethics, morality, allowed to do, possible to do, anything philosphical in nature, etc..) or design and architectural choices should be reserved for another thread ( I do not need to switch operating systems, or make different software choices, or etc.., I already spent hours on this type of rhetoric and ask that it's enough and not to do it here for me, I get it that maybe you choose a different operating system or a different software or whatever but I would like to work with this choices of software architectures so please help on the issue at hand not to tell me some other software or system software or operating system or whatever is better , I am not all knowing etc.. but it's most likely that you will not necessarily rock my world here and I would like to get the software working with the choices that were made) and will be ignored by me in advance but please refrain from doing so because it will hinder my ability to get the answers that I am seeking.
 
You write so confuse, with an horrible punctuation, that one does not understand what you want.
If you want others to take time to help you, please, take your time to write correctly and understandable.

It seems, you want to use sendmail (what is used by mail to send) as client and want (perhaps) that the server change headers. At client side you will not be able to change the behavior of the server. And for sendmail to send with gmail, you will need cyrus sasl authenticate with xoath2, or perhaps it is possible with google's two way authentication.
 
first you need to compile sendmail with sasl support either base or ports
then alter sendmail.mc/cf to use client auth
add these lines to the mc file you are using
Code:
define(`confAUTH_MECHANISMS', `GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
FEATURE(`authinfo',`hash /etc/mail/auth/client-info')dnl

then put your client auth info in the file you configured in sendmail.cf/mc (/etc/mail/auth/client-info)

AuthInfo:mail.kaufland.de  "U:test" "I:paul@kaufland.de" "P:pass@kauflandmail" "M:LOGIN"
              
cd /etc/mail/auth
makemap hash client-info < client-info
for gmail im not sure that user pass works but you can somehow create a key combo or something via google cloud apps or something

for using sendmail in base add
SENDMAIL_CFLAGS=-I/usr/local/include/sasl -DSASL
SENDMAIL_LDADD=/usr/local/lib/libsasl2.so
to make.conf and rebuild sendmail
cd /usr/src/usr.sbin/sendmail
make clean obj all install
it may be necessary to build /usr/src/lib/libsm and /usr/src/lib/libsmutil first
 
Here is a discussion of authenticating sendmail as client for gmail, but I did not try it:

 
/etc/mail/authinfo:
AuthInfo:mail.kaufland.de "U:paul@kaufland.de" "P:taTDc2ck20s@!d" "M:LOGIN"
#AuthInfo:mail.kaufland.de "U:root" "I:paul@kaufland.de" "P:taTDc2ck20s@!d"

added to /etc/make.conf file with the submissions that you suggested

thank you. not sure if authentication is an issue so much as it's not even trying to authenticate... nevertheless I made the changes that you suggested

mailer daemon response when trying to send myself an email
sixpiece@kaufland:~ $ mail


sixpiece@kaufland:~ $ mail
Mail version 8.1 6/6/93. Type ? for help.
"/var/mail/sixpiece": 1068 messages 1 new 1068 unread
>N1068 MAILER-DAEMON Thu Dec 18 21:43 73/2514 "Returned mail: see t"
& 1068
Message 1068:
From MAILER-DAEMON Thu Dec 18 21:43:13 2025
Date: Thu, 18 Dec 2025 21:43:12 -0500 (EST)
From: Mail Delivery Subsystem <MAILER-DAEMON>
To: <sixpiece@kaufland.de>
Subject: Returned mail: see transcript for details

This is a MIME-encapsulated message

--5BIKhCeA003375.1766090592/kaufland.de

The original message was received at Thu, 18 Dec 2025 15:43:06 -0500 (EST)
from localhost [127.0.0.1]

----- The following addresses had permanent fatal errors -----
<paul.heitz@vodacom.com>
(reason: 554 5.7.1 <unknown[2a01:3c2:b312:a3f3:134b::2]>: Client host rejected: Access denied)

----- Transcript of session follows -----
... while talking to mail.kaufland.de.:
>>> DATA
<<< 554 5.7.1 <unknown[2a01:3c2:b312:a3f3:134b::2]>: Client host rejected: Access denied
554 5.0.0 Service unavailable
<<< 554 5.5.1 Error: no valid recipients

--5BIKhCeA003375.1766090592/kaufland.de
Content-Type: message/delivery-status

Reporting-MTA: dns; kaufland.de
Received-From-MTA: DNS; localhost
Arrival-Date: Thu, 18 Dec 2025 15:43:06 -0500 (EST)

Final-Recipient: RFC822; paul.heitz@vodacom.com
X-Actual-Recipient: rfc822; paul.heitz@vodacom.com
Action: failed
Status: 5.7.1
Remote-MTA: DNS; mail.kaufland.de
Diagnostic-Code: SMTP; 554 5.7.1 <unknown[2a01:3c2:b312:a3f3:134b::2]>: Client host rejected: Access denied
Last-Attempt-Date: Thu, 18 Dec 2025 15:43:12 -0500 (EST)

--5BIKhCeA003375.1766090592/kaufland.de
Content-Type: message/rfc822

Return-Path: <sixpiece@kaufland.de>
Received: from kaufland.de (localhost [127.0.0.1])
by kaufland.de (8.18.1/8.18.1) with ESMTPS id 5BIKh5eB003373
(version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO)
for <paul.heitz@vodacom.com>; Thu, 18 Dec 2025 15:43:06 -0500 (EST)
(envelope-from sixpiece@kaufland.de)
Received: (from sixpiece@localhost)
by kaufland.de (8.18.1/8.18.1/Submit) id 5BIKh4xR003372
for paul.heitz@vodacom.com; Thu, 18 Dec 2025 15:43:04 -0500 (EST)
(envelope-from sixpiece)
Date: Thu, 18 Dec 2025 15:43:04 -0500 (EST)
From: paul <sixpiece@kaufland.de>
Message-Id: <202512182043.5BIKh4xR003372@kaufland.de>sixpiece@kaufland:~ $ mail
Mail version 8.1 6/6/93. Type ? for help.
"/var/mail/sixpiece": 1068 messages 1 new 1068 unread
>N1068 MAILER-DAEMON Thu Dec 18 15:43 73/2514 "Returned mail: see t"
& 1068
Message 1068:
From MAILER-DAEMON Thu Dec 18 15:43:13 2025
Date: Thu, 18 Dec 2025 15:43:12 -0500 (EST)
From: Mail Delivery Subsystem <MAILER-DAEMON>
To: <sixpiece@kaufland.de>
Subject: Returned mail: see transcript for details

This is a MIME-encapsulated message

--5BIKhCeA003375.1766090592/kaufland.de

The original message was received at Thu, 18 Dec 2025 15:43:06 -0500 (EST)
from localhost [127.0.0.1]

----- The following addresses had permanent fatal errors -----
<paul.heitz@vodacom.com>
(reason: 554 5.7.1 <unknown[2a01:3c2:b312:a3f3:134b::2]>: Client host rejected: Access denied)

----- Transcript of session follows -----
... while talking to mail.kaufland.de.:
>>> DATA
<<< 554 5.7.1 <unknown[2a01:3c2:b312:a3f3:134b::2]>: Client host rejected: Access denied
554 5.0.0 Service unavailable
<<< 554 5.5.1 Error: no valid recipients

--5BIKhCeA003375.1766090592/kaufland.de
Content-Type: message/delivery-status

Reporting-MTA: dns; kaufland.de
Received-From-MTA: DNS; localhost
Arrival-Date: Thu, 18 Dec 2025 15:43:06 -0500 (EST)

Final-Recipient: RFC822; paul.heitz@vodacom.com
X-Actual-Recipient: rfc822; paul.heitz@vodacom.com
Action: failed
Status: 5.7.1
Remote-MTA: DNS; mail.kaufland.de
Diagnostic-Code: SMTP; 554 5.7.1 <unknown[2a01:3c2:b312:a3f3:134b::2]>: Client host rejected: Access denied
Last-Attempt-Date: Thu, 18 Dec 2025 15:43:12 -0500 (EST)

--5BIKhCeA003375.1766090592/kaufland.de
Content-Type: message/rfc822

Return-Path: <sixpiece@kaufland.de>
Received: from kaufland.de (localhost [127.0.0.1])
by kaufland.de (8.18.1/8.18.1) with ESMTPS id 5BIKh5eB003373
(version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO)
for <paul.heitz@vodacom.com>; Thu, 18 Dec 2025 15:43:06 -0500 (EST)
(envelope-from sixpiece@kaufland.de)
Received: (from sixpiece@localhost)
by kaufland.de (8.18.1/8.18.1/Submit) id 5BIKh4xR003372
for paul.heitz@vodacom.com; Thu, 18 Dec 2025 15:43:04 -0500 (EST)
(envelope-from sixpiece)
Date: Thu, 18 Dec 2025 15:43:04 -0500 (EST)
From: paul <sixpiece@kaufland.de>
Message-Id: <202512182043.5BIKh4xR003372@kaufland.de>
To: paul.heitz@vodacom.com
Subject: tet

fdafd

--5BIKhCeA003375.1766090592/kaufland.de--



To: paul.heitz@vodacom.com
Subject: tet

fdafd

--5BIKhCeA003375.1766090592/kaufland.de--



Mail version 8.1 6/6/93. Type ? for help.
"/var/mail/sixpiece": 1068 messages 1 new 1068 unread
>N1068 MAILER-DAEMON Thu Dec 18 21:43 73/2514 "Returned mail: see t"
& 1068
Message 1068:
From MAILER-DAEMON Thu Dec 18 21:43:13 2025
Date: Thu, 18 Dec 2025 21:43:12 -0500 (EST)
From: Mail Delivery Subsystem <MAILER-DAEMON>
To: <sixpiece@kaufland.de>
Subject: Returned mail: see transcript for details

This is a MIME-encapsulated message

--5BIKhCeA003375.1766090592/kaufland.de

The original message was received at Thu, 18 Dec 2025 15:43:06 -0500 (EST)
from localhost [127.0.0.1]

----- The following addresses had permanent fatal errors -----
<paul.heitz@vodacom.com>
(reason: 554 5.7.1 <unknown[2a01:3c2:b312:a3f3:134b::2]>: Client host rejected: Access denied)

----- Transcript of session follows -----
... while talking to mail.kaufland.de.:
>>> DATA
<<< 554 5.7.1 <unknown[2a01:3c2:b312:a3f3:134b::2]>: Client host rejected: Access denied
554 5.0.0 Service unavailable
<<< 554 5.5.1 Error: no valid recipients

--5BIKhCeA003375.1766090592/kaufland.de
Content-Type: message/delivery-status

Reporting-MTA: dns; kaufland.de
Received-From-MTA: DNS; localhost
Arrival-Date: Thu, 18 Dec 2025 15:43:06 -0500 (EST)

Final-Recipient: RFC822; paul.heitz@vodacom.com
X-Actual-Recipient: rfc822; paul.heitz@vodacom.com
Action: failed
Status: 5.7.1
Remote-MTA: DNS; mail.kaufland.de
Diagnostic-Code: SMTP; 554 5.7.1 <unknown[2a01:3c2:b312:a3f3:134b::2]>: Client host rejected: Access denied
Last-Attempt-Date: Thu, 18 Dec 2025 15:43:12 -0500 (EST)

--5BIKhCeA003375.1766090592/kaufland.de
Content-Type: message/rfc822

Return-Path: <sixpiece@kaufland.de>
Received: from kaufland.de (localhost [127.0.0.1])
by kaufland.de (8.18.1/8.18.1) with ESMTPS id 5BIKh5eB003373
(version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO)
for <paul.heitz@vodacom.com>; Thu, 18 Dec 2025 15:43:06 -0500 (EST)
(envelope-from sixpiece@kaufland.de)
Received: (from sixpiece@localhost)
by kaufland.de (8.18.1/8.18.1/Submit) id 5BIKh4xR003372
for paul.heitz@vodacom.com; Thu, 18 Dec 2025 15:43:04 -0500 (EST)
(envelope-from sixpiece)
Date: Thu, 18 Dec 2025 15:43:04 -0500 (EST)
From: paul <sixpiece@kaufland.de>
Message-Id: <202512182043.5BIKh4xR003372@kaufland.de>sixpiece@kaufland:~ $ mail
Mail version 8.1 6/6/93. Type ? for help.
"/var/mail/sixpiece": 1068 messages 1 new 1068 unread
>N1068 MAILER-DAEMON Thu Dec 18 15:43 73/2514 "Returned mail: see t"
& 1068
Message 1068:
From MAILER-DAEMON Thu Dec 18 15:43:13 2025
Date: Thu, 18 Dec 2025 15:43:12 -0500 (EST)
From: Mail Delivery Subsystem <MAILER-DAEMON>
To: <sixpiece@kaufland.de>
Subject: Returned mail: see transcript for details

This is a MIME-encapsulated message

--5BIKhCeA003375.1766090592/kaufland.de

The original message was received at Thu, 18 Dec 2025 15:43:06 -0500 (EST)
from localhost [127.0.0.1]

----- The following addresses had permanent fatal errors -----
<paul.heitz@vodacom.com>
(reason: 554 5.7.1 <unknown[2a01:3c2:b312:a3f3:134b::2]>: Client host rejected: Access denied)

----- Transcript of session follows -----
... while talking to mail.kaufland.de.:
>>> DATA
<<< 554 5.7.1 <unknown[2a01:3c2:b312:a3f3:134b::2]>: Client host rejected: Access denied
554 5.0.0 Service unavailable
<<< 554 5.5.1 Error: no valid recipients

--5BIKhCeA003375.1766090592/kaufland.de
Content-Type: message/delivery-status

Reporting-MTA: dns; kaufland.de
Received-From-MTA: DNS; localhost
Arrival-Date: Thu, 18 Dec 2025 15:43:06 -0500 (EST)

Final-Recipient: RFC822; paul.heitz@vodacom.com
X-Actual-Recipient: rfc822; paul.heitz@vodacom.com
Action: failed
Status: 5.7.1
Remote-MTA: DNS; mail.kaufland.de
Diagnostic-Code: SMTP; 554 5.7.1 <unknown[2a01:3c2:b312:a3f3:134b::2]>: Client host rejected: Access denied
Last-Attempt-Date: Thu, 18 Dec 2025 15:43:12 -0500 (EST)

--5BIKhCeA003375.1766090592/kaufland.de
Content-Type: message/rfc822

Return-Path: <sixpiece@kaufland.de>
Received: from kaufland.de (localhost [127.0.0.1])
by kaufland.de (8.18.1/8.18.1) with ESMTPS id 5BIKh5eB003373
(version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384 bits=256 verify=NO)
for <paul.heitz@vodacom.com>; Thu, 18 Dec 2025 15:43:06 -0500 (EST)
(envelope-from sixpiece@kaufland.de)
Received: (from sixpiece@localhost)
by kaufland.de (8.18.1/8.18.1/Submit) id 5BIKh4xR003372
for paul.heitz@vodacom.com; Thu, 18 Dec 2025 15:43:04 -0500 (EST)
(envelope-from sixpiece)
Date: Thu, 18 Dec 2025 15:43:04 -0500 (EST)
From: paul <sixpiece@kaufland.de>
Message-Id: <202512182043.5BIKh4xR003372@kaufland.de>
To: paul.heitz@vodacom.com
Subject: tet

fdafd

--5BIKhCeA003375.1766090592/kaufland.de--



To: paul.heitz@vodacom.com
Subject: tet

fdafd

--5BIKhCeA003375.1766090592/kaufland.de--
sendmail.mc
define(`LOCAL_MAILER_PATH', `/usr/libexec/sendmail/sendmail')dnl
define(`LOCAL_MAILER_ARGS', `sendmail -oem -oi -t')dnl
define(`confQUEUE_DIR', `/var/spool/mqueue')dnl

divert(0)dnl
include(`/usr/share/sendmail/cf/m4/cf.m4')dnl
VERSIONID(`FreeBSD laptop smarthost')dnl
OSTYPE(`freebsd5')dnl

dnl --- Global Settings ---
define(`SMART_HOST', `[mail.kaufland.de]')dnl
define(`confQUEUE_DIR', `/var/spool/mqueue')dnl
dnf define(`confAUTH_MECHANISMS', `LOGIN PLAIN')dnl
define(`confAUTH_MECHANISMS', `GSSAPI DIGEST-MD5 CRAM-MD5 LOGIN PLAIN')dnl
define(`confDOMAIN_NAME', `kaufland.de')dnl
define(`STATUS_FILE', `/var/log/sendmail.st')dnl

dnl --- Mailer Arguments (For Port 587) ---
define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl
define(`ESMTP_MAILER_ARGS', `TCP $h 587')dnl

dnl --- The Genericstable (The User Swap) ---
FEATURE(`genericstable', `hash -o /etc/mail/genericstable.db')dnl
GENERICS_DOMAIN(`kaufland.de kaufland localhost localhost.localdomain')dnl
GENERICS_DOMAIN_FILE(`/etc/mail/generics-domains')dnl
dnl --- Rewriting and Masquerading ---
MASQUERADE_AS(`kaufland.de')dnl
FEATURE(`masquerade_envelope')dnl
FEATURE(`allmasquerade')dnl
EXPOSED_USER(`root')dnl

dnl --- Authentication ---
FEATURE(`authinfo', `hash -o /etc/mail/authinfo.db')dnl

dnl --- Mailers ---
MAILER(`local')dnl
MAILER(`smtp')dnl

LOCAL_CONFIG
CPkaufland
CPkaufland.de
CPlocalhost
CPlocalhost.localdomain

# CG is specifically required for genericstable to trigger
CGkaufland
CGkaufland.de
CGlocalhost
CGlocalhost.localdomain

I had this idea also to edit the /home/sixpiece .mailrc file or .mail_aliases
sixpiece@kagan:~ $ ls .mail*
.mail_aliases .mailrc
sixpiece@kagan:~ $ pwd
/home/sixpiece
sixpiece@kagan:~ $
I also did commands like sendmail -bt which sometimes it illustrated it was using the paul@kaufland.de email and other times it wasn't. It should be clear though at no point did it do this properly. Also I changed my laptop from just kaufland host to kaufland.de host when the program complained about a fully qualified domain host name...
 
This is from the time gmail needed just user and pass to authenticate, you can try it with the kaufland account:

 
there is no indication that it's doing the right thing and that an authentication would fail or be refused because it was not not PLAIN or SASL but this could be something I saw your line in sendmail had multiple options available including plain so I allowed it for that since it seemed a non issue. also the auth info line in the sendmail.mc I believe I already had something with the same effect. The build parameters to make.conf seemed interesting I am not familiar with it enough but I heard something that a masquerading is happening and there is P type and F type flags and it has to change certain types I am not exactly clear whatever the reason I ended up seeing no harm in adding the parameters and could possibly bring me a little closer towards a solution.
 
Or just use msmtp with this configuration:
Code:
defaults
auth    on
tls     on
tls_trust_file /usr/local/share/certs/ca-root-nss.crt
logfile ~/.msmtp.log

account    mainAcount
host mail.MailAccount.Domain
port 465
from "user@domain.tld"
user "user@domain.tld"
passwordeval "pass mail/yourmail"

account default : mainAccount
 
well your server won't advertise auth. i taught you wanted to send thru a server that already had auth configured. now i see mail.kaufland.de is in fact your own host
 
well your server won't advertise auth. i taught you wanted to send thru a server that already had auth configured. now i see mail.kaufland.de is in fact your own host
no thank you I appreciate that... sorry I should have given a thumbs up... I did put in your idea and said I used it... I was tired up until 5am trying to get this to work this morning... and I did mention I would be interested in potentially multiple servers... so there was no harm... I wasn't meaning to be so negative by just simply stating that your solution from bringing closer towards the solution but not necessarily the solution in and of itself.
 
Or just use msmtp with this configuration:
Code:
defaults
auth    on
tls     on
tls_trust_file /usr/local/share/certs/ca-root-nss.crt
logfile ~/.msmtp.log

account    mainAcount
host mail.MailAccount.Domain
port 465
from "user@domain.tld"
user "user@domain.tld"
passwordeval "pass mail/yourmail"

account default : mainAccount
I should have kept this bigger I thought I would spare some people the reading but of course it's necessary to keep the thread clean and have this type of responses stop. My apologies and yawn. This should be on another thread if you want to advertise this software there are other ways for you to go about doing this. I understand the paradise starts here and that you know better, etc.. and everything is so simple... in your world and complicated and bad in mine, etc. and so forth... this thread is NOT FOR ARCHITECTURAL DECISIONS AND SOFTWARE CHOICES IF I WANT TO DO THAT THAN I WILL A THREAD FOR THAT AND YOU CAN ADVERTISE YOUR PERFECT SIMPLE AND EASY AND WONDERFUL SUPERIOR ADVANCED AND MORE KNOWING QUICKER AND EASIER AND MORE COMPREHENSIVE AND MORE GENIUS AND SMARTER SOFTWARE SOLUTION AT THAT POINT IN TIME...

Note: I am only interested in technical responses to this matter, social type questions (ethics, morality, allowed to do, possible to do, anything philosphical in nature, etc..) or design and architectural choices should be reserved for another thread ( I do not need to switch operating systems, or make different software choices, or etc.., I already spent hours on this type of rhetoric and ask that it's enough and not to do it here for me, I get it that maybe you choose a different operating system or a different software or whatever but I would like to work with this choices of software architectures so please help on the issue at hand not to tell me some other software or system software or operating system or whatever is better , I am not all knowing etc.. but it's most likely that you will not necessarily rock my world here and I would like to get the software working with the choices that were made) and will be ignored by me in advance but please refrain from doing so because it will hinder my ability to get the answers that I am seeking.
 
this is my email configuration letter so port 25 appears to be blocked for sending...
Betreff: Anleitung zur E-Mail-Konfiguration

Sehr geehrte Mitarbeiterin, sehr geehrter Mitarbeiter,

hier finden Sie die Anleitung zur Konfiguration Ihrer E-Mail bei Kaufland:

E-Mail-Adresse und Passwort

Verwenden Sie Ihre Kaufland-E-Mail-Adresse und das zugehörige Passwort.
E-Mail-Programm öffnen

Öffnen Sie Ihr bevorzugtes E-Mail-Programm (z.B. Outlook, Thunderbird).
Neues Konto hinzufügen

Gehen Sie zu den Einstellungen und wählen Sie die Option, ein neues Konto hinzuzufügen.
Kontotyp auswählen

Wählen Sie den Kontotyp "POP3" oder "IMAP" aus, je nach Ihren Präferenzen.
Servereinstellungen eingeben

Eingehender Mailserver (POP3/IMAP): pop.kaufland.de oder imap.kaufland.de
Ausgehender Mailserver (SMTP): smtp.kaufland.de
Port für eingehende Mails: 995 (für POP3) oder 993 (für IMAP)
Port für ausgehende Mails: 465 (für SMTP)
SSL/TLS-Verschlüsselung: Aktivieren Sie SSL/TLS für beide Server.
Benutzernamen und Passwort eingeben

Geben Sie Ihre vollständige Kaufland-E-Mail-Adresse als Benutzernamen ein.
Geben Sie Ihr Passwort ein.
Konto testen
Speichern Sie die Einstellungen und testen Sie die Verbindung, um sicherzustellen, dass alles korrekt konfiguriert ist.
Falls Sie auf Probleme stoßen oder weitere Unterstützung benötigen, wenden Sie sich bitte an den IT-Support von Kaufland unter support@kaufland.de.

Vielen Dank für Ihre Aufmerksamkeit.

Mit freundlichen Grüßen,

Axel Pototzki Technische Facility Management Kaufland Deutschland

Email¶
Service Encryption Host Port
IMAP STARTTLS kaufland hostname 143
IMAPS SSL kaufland hostname 993
POP3 STARTTLS kaufland hostname 110
POP3S SSL kaufland hostname 995
SMTP STARTTLS kaufland hostname 587
SMTPS SSL kaufland hostname 465
 
hruodr : ok, yes I understand , this thread is not about my intelligence and I think it's annoying that there are people that would spend time harassing people who simply ask questions of a technical nature by insulting their intelligence, telling me that I do not understand and that I am not valid. I asked clearly not to go this route. I spent hours on answering these types of insults and it's very unfortunate to have to deal with this toxicity.

Long and Confuse answers no I don't confuse answers I am not going to insult you back but no I don't confuse answers. The details are necessary logs and stuff are required they have been put in quotes but yes you are not helping by attacking on this just because a guy has a question you have to publicly try to smear and attack them.

he just proposed - I told you I am not interested to hear other software solutions if you want to hear them go ahead and create your thread dedicated to alternative solutions. Sendmail and Proofpoint are a great solution that has been the mainstream and still largely is for FreeBSD, it's in their manual. The software he's advertising in your own link that you provided me it says it's not well maintained. IF YOU WANT TO DEBATE SOFTWARE PACKAGES GO MAKE YOUR OWN THREAD.

The good luck and your reference earlier to something that looked similar to what I was trying to do seems like it could be helpful so that I will thank you for. The rest is not necessarily or appreciated, focus on letting me get the solution I am looking for it would be great.

No, you do not understand, and you do not want others to understand.
And with your long and confuse answers no one will be able to help.

He just proposed a substitute of sendmail that acts as sendmail and is much easier to configure.
You can also use the dma that is now in FreeBSD base.
Then mail / mailx sends through msmtp or dma instead through sendmail.

I wish you good luck.
 
I should have kept this bigger I thought I would spare some people the reading but of course it's necessary to keep the thread clean and have this type of responses stop. My apologies and yawn. This should be on another thread if you want to advertise this software there are other ways for you to go about doing this. I understand the paradise starts here and that you know better, etc.. and everything is so simple... in your world and complicated and bad in mine, etc. and so forth... this thread is NOT FOR ARCHITECTURAL DECISIONS AND SOFTWARE CHOICES IF I WANT TO DO THAT THAN I WILL A THREAD FOR THAT AND YOU CAN ADVERTISE YOUR PERFECT SIMPLE AND EASY AND WONDERFUL SUPERIOR ADVANCED AND MORE KNOWING QUICKER AND EASIER AND MORE COMPREHENSIVE AND MORE GENIUS AND SMARTER SOFTWARE SOLUTION AT THAT POINT IN TIME...

Note: I am only interested in technical responses to this matter, social type questions (ethics, morality, allowed to do, possible to do, anything philosphical in nature, etc..) or design and architectural choices should be reserved for another thread ( I do not need to switch operating systems, or make different software choices, or etc.., I already spent hours on this type of rhetoric and ask that it's enough and not to do it here for me, I get it that maybe you choose a different operating system or a different software or whatever but I would like to work with this choices of software architectures so please help on the issue at hand not to tell me some other software or system software or operating system or whatever is better , I am not all knowing etc.. but it's most likely that you will not necessarily rock my world here and I would like to get the software working with the choices that were made) and will be ignored by me in advance but please refrain from doing so because it will hinder my ability to get the answers that I am seeking.
Was this all bold and caps was necessary ?

Having port 25 blocked is a known issue that can be resolved by asking your isp to unblock it for your static ip. But from what I recall, you want this setup on a laptop, which of course would not work with your current architectural design since you will have no control on what ip you get.

MAYBE IT IS TIME TO THINK ABOUT YOUR ARCHITECTURAL DECISION DON'T YOU THINK ?
 
Was this all bold and caps was necessary ?

Having port 25 blocked is a known issue that can be resolved by asking your isp to unblock it for your static ip. But from what I recall, you want this setup on a laptop, which of course would not work with your current architectural design since you will have no control on what ip you get.

MAYBE IT IS TIME TO THINK ABOUT YOUR ARCHITECTURAL DECISION DON'T YOU THINK ?
if you have both people delete their thread that I consider irrelevant than or I had control to modify the thread than yes it would be unnecessary unfortunately I am not the mod. your getting me to spend considerable useless time when I am trying to provide a straightforward solution for myself and for others or myself in the future should I embark again on this journey.

your second question is NO if you want to look and discuss architectural decisions pertaining to software go right ahead on your own thread. I am plenty confident and have considered the software decisions and I am busy if I can just work on the technicalities to get my software goals realized that's fine.
 
Your email provider does not allow inbound connection from port 25, why are you trying to do so then ?
Just use whatever smtp port they want, and use smtp to communicate.
 
But from what I recall, you want this setup on a laptop, which of course would not work with your current architectural design since you will have no control on what ip you get.

MAYBE IT IS TIME TO THINK ABOUT YOUR ARCHITECTURAL DECISION DON'T YOU THINK ?
Yes, it is possible from a laptop with a dynamic IP because he would be (mis)using sendmail as client.
You proposed him a client that simulates this (mis)use of sendmail, and dma in FreeBSD base does it also.
Anyway, my answers are irrelevant and takes the precious time of others.
I ask for excuses for taking your time and wish you all the best, I leave the thread.
 
afaik sendmail does not support direct ssl connection as a client to port 465, you need to use stunnel for that
you may try if they support starttls on 587
 
thank you I am working on that... there seems to be quite a few terms in the sendmail configuration that I am not so strong on that I am reading at the moment just basic stuff I see all the time that I want to reinforce my understanding to make it easier. I have had quite a go at it going to read the manual for now... and see if I can start to figure it out... how that is done... but yes setting the outgoing mail settings correctly, choosing the port , the right handshaking signals and certificate exchange with the right encryption algorithms and norms does sound like a good idea it's just how to do that.. for now... there might be some realizations and there's stuff I don't exactly know but this is an adventure and I am documenting that process . I tried last night many different things but the manual is often a good place to start but trying may have helped me to understand the manual a little better.
 
Having sendmail sending mail from localhost will only get flagged as spam on any serious email provider. Which then would probably add the ip to a blocklist.
OP isn't clear about what is wanted here.
Either this is about using the laptop as a client, and then you just need smtp to send the email to the email provider that then send the mail from there.
Or it is about sending a mail directly from the laptop, which will automatically flagged as spam since there would not be any spf/dmarc records due to multiple factors.
And of course the second case does not involve authentication, so I don't see why you are trying to investigate authentication there. Which would meant that you are in the first case, which would imply to not use port 25 since it is not available by your email provider.

I know you said you don't want to discuss about architecture, but you need to at least tell us what you really want to achieve.
 
monwarez: Having sendmail sending mail from localhost will only get flagged as spam on any serious email provider. Which then would probably add the ip to a blocklist.
this is a social issue I am not asking for social issues it was technical solutions.

OP isn't clear about what is wanted here.
I have been absolutely clear. I do not need insults about my validity and competence and clarity. It's another onslaught of attacks that prevent me from being able to do what I want to. You don't gain even if it's not intentional I see where this is going ...anything by trying to create a witch hunt against me.

Or it is about sending a mail directly from the laptop, which will automatically flagged as spam since there would not be any spf/dmarc records due to multiple factors.
And of course the second case does not involve authentication, so I don't see why you are trying to investigate authentication there. Which would meant that you are in the first case, which would imply to not use port 25 since it is not available by your email provider.

I know you said you don't want to discuss about architecture, but you need to at least tell us what you really want to achieve.

Thanks Quote Reply
Report
this is spam I asked no architecture make your own thread your begging me to permit this. then you're speculating on social issues I am not asking for that.

afaik sendmail does not support direct ssl connection as a client to port 465, you need to use stunnel for that
you may try if they support starttls on 587
I believe it does with the smart host and that's what it does but on the manual it's interesting to see that ports are not mentioned anywhere I kind of find that interesting... I also see that fax capabilities are added now on an experimental basis based on hylafax so that could be a bonus of something I would like to do VOIP faxing I forget the official word is one of my goals I am looking to do ... I will try to expedite you an answer without going through the entire manual entirely because this question is interesting. Although technically I am the one that is supposed to answer questions and give answers I still find that it increases the learning and the value of this thread.
 
this is from Gemini :

You are absolutely correct. Sendmail does not natively support "Implicit TLS" (often called SMTPS) on port 465 when acting as a client.
This is because Sendmail is designed to follow the SMTP standard where the connection starts as plain text and then upgrades to encryption via the STARTTLS command. On port 465, the encryption must happen before the SMTP conversation begins, which Sendmail cannot do on its own.

1. Using stunnel (The Port 465 Workaround)

If you must use port 465 (for example, if your ISP blocks port 587 or the remote server only accepts implicit SSL), you need a "wrapper" like stunnel.
  • How it works: Stunnel sits between Sendmail and the remote server. It opens a local port (e.g., 10025), encrypts anything sent to it, and forwards it to the remote port 465.
  • The Chain: Sendmail (Port 10025) $\rightarrow$ Stunnel $\rightarrow$ Remote Server (Port 465).

2. Using STARTTLS on Port 587 (The Recommended Way)

As you suspected, using Port 587 with STARTTLS is the modern standard (RFC 6409) and is natively supported by Sendmail without extra software.

How to configure it:

In your sendmail.mc, you typically only need to define the "Smart Host" and specify the port:
Bash

Code:
dnl # Define the relay server and the submission port (587)
define(`SMART_HOST', `[smtp.yourserver.com]')dnl
define(`RELAY_MAILER_ARGS', `TCP $h 587')dnl
define(`ESMTP_MAILER_ARGS', `TCP $h 587')dnl
Why this is better:
  • No extra processes: You don't have to manage or monitor an stunnel daemon.
  • Standardized: Almost every modern mail provider (Gmail, Outlook, AWS SES) supports STARTTLS on 587.
  • Easier Debugging: You can see the initial "220" greeting in logs before the encryption kicks in, making it easier to diagnose connection issues.

Summary Table: 465 vs 587

FeaturePort 465 (SMTPS)Port 587 (Submission)
Encryption TypeImplicit SSL/TLSExplicit (STARTTLS)
Sendmail SupportNeeds stunnelNative
StatusDeprecated, then reinstatedCurrent Standard
ReliabilityGood, but complex setupHighest
Note: If you choose port 587, ensure you have your authinfo file configured correctly so Sendmail can authenticate after the STARTTLS negotiation is complete.

Would you like the specific stunnel.conf and sendmail.mc snippets to set up the port 465 tunnel, or should we look at the authinfo configuration for port 587?


thank you for the attention on that so it looks I wil not implement this for simplicity but will keep it in mind in future and use the 587 port for smtp starttls. as such :
SMTP STARTTLS mail.kaufland.de hostname 587
 
Back
Top