I am having trouble with EXIM passing e-mails. Domains are fictitious, but work better than using "example" to me.
Expected -> device -> relay#insurance.savewiththelizard.com -> payingtoomuch.com
Happening -> device -> relay#insurance.savewiththelizard.com -> vanishes
I found this Magento/exim emails not arriving, sent to and from own domain , but that nor the second answer has resolved my issue.
I have payingtoomuch.com e-mail hosted at GSuite. I have payingtoomuch.com website hosted at insurance.savewiththelizard.com .
When I use relay#insurance.savewiththelizard.com , it will pass to domains that are not hosted locally. Example: I am able to send an e-mail using relay#insurance.savewiththelizard.com to gmail.com, outlook.com, thiscompany.com, but I am not able to send e-mail to payingtoomuch.com . There are no errors when sending the e-mails.
On VestaCP, DNS nor MAIL are installed for payingtoomuch.com on insurance.savewiththelizard.com .
payingtoomuch.com
A = 33.33.33.1 [fictitious]
WWW = 33.33.33.1 [fictitious]
MX = aspmx.l.google.com
insurance.savewiththelizard.com SMTP
A = 33.33.33.1 [fictitious]
MX = 33.33.33.1 [fictitious]
2020-05-07 19:45:53 1jRwFF-0001mO-Ic <= relay#insurance.savewiththelizard.com H=(SERVER218) [X] P=esmtpsa X=TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256 CV=no A=dovecot_plain:relay#insurance.savewiththelizard.com S=28773
2020-05-07 19:45:54 1jRwFF-0001mO-Ic => doctor#payingtoomuch.com R=dnslookup T=remote_smtp H=aspmx.l.google.com [172.217.197.26] X=TLS1.2:ECDHE_ECDSA_AES_128_GCM_SHA256:128 CV=yes C="250 2.0.0 OK 1588898754 138si4849187qkm.228 - gsmtp"
2
2020-05-07 07:03:37 1Wfk3-0001eA-FF <= relay#insurance.savewiththelizard.com H=(EXTRA) [X] P=esmtpsa X=TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256 CV=no A=dovecot_plain:relay#insurance.savewiththelizard.com S=38927
2020-05-07 07:03:38 1Wfk3-0001eA-FF => accounting#payingtoomuch.com R=dnslookup T=remote_smtp H=aspmx.l.google.com [209.85.144.27] X=TLS1.2:ECDHE_ECDSA_AES_128_GCM_SHA256:128 CV=yes C="250 2.0.0 OK 1588853018 z5si2008827qtb.399 - gsmtp"
2020-05-07 07:03:38 1Wfk3-0001eA-FF Completed
2
The e-mails are not in Junk E-Mail, Spam, etc.
I thought one of these may solve the issue, but it has not.
routetotpay:
driver = manualroute
route_list = payingtoomuch.com
transport = remote_smtp
smart_route:
driver = manualroute
route_list = payingtoomuch.com
transport = remote_smtp
exim4.conf.template file
line:
domainlist local_domains = dsearch;/etc/exim4/domains/
convert to:
domainlist local_domains = !payingtoomuch.com : dsearch;/etc/exim4/domains/
restart exim:
service exim4 restart
Related
i'm setting up a mail server [postfix] which with use Ciphermail as RelayHost.
With the setup i'm able to send mail to external domain but when i'm replying from external domain i'm getting following error.
ciphermail [relay host] main.cf
alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
append_dot_mydomain = no
biff = no
config_directory = /etc/postfix
content_filter = djigzo:[127.0.0.1]:10025
djigzo_after_filter_message_size_limit = 512000000
djigzo_before_filter_message_size_limit = 10240000
djigzo_mailbox_size_limit = 512000000
djigzo_mydestination = localhost, svitsolutions.in, mx1.svitsolutions.in
djigzo_myhostname = mx1.svitsolutions.in
djigzo_mynetworks = 103.246.45.0/24, 192.168.15.0/24, 192.168.15.52/32
djigzo_parent_domain_matches_subdomains = relay_domains
djigzo_rbl_clients =
djigzo_reject_unverified_recipient = reject
djigzo_relay_domains = svitsolutions.in
djigzo_relay_transport_host = mail.svitsolutions.in
djigzo_relay_transport_host_mx_lookup =
djigzo_relay_transport_host_port = 25
djigzo_relayhost =
djigzo_relayhost_mx_lookup = mx
djigzo_relayhost_port = 25
djigzo_smtp_helo_name = mail.svitsolutions.in
djigzo_unverified_recipient_reject_code = 450
local_recipient_maps =
local_transport = $mydestination
mail_name = mx1.svitsolutions.in
mailbox_size_limit = ${djigzo_mailbox_size_limit}
message_size_limit = ${djigzo_after_filter_message_size_limit}
mydestination = ${djigzo_mydestination}, mail.svitsolutions.in, svitsolutions.in
myhostname = ${djigzo_myhostname}
mynetworks = 127.0.0.0/8, [::1]/128, ${djigzo_mynetworks}
parent_domain_matches_subdomains = ${djigzo_parent_domain_matches_subdomains}
queue_minfree = 768000000
recipient_delimiter = +
relay_domains = ${djigzo_relay_domains}
relay_transport = relay${djigzo_relay_transport_host?:${djigzo_relay_transport_host_mx_lookup:[}${djigzo_relay_transport_host}${djigzo_relay_transport_host_mx_lookup:]}:${djigzo_relay_transport_host_port}}
relayhost = ${djigzo_relayhost_mx_lookup:${djigzo_relayhost?[}}${djigzo_relayhost}${djigzo_relayhost_mx_lookup:${djigzo_relayhost?]}}${djigzo_relayhost?:${djigzo_relayhost_port}}
smtp_helo_name = ${djigzo_smtp_helo_name?$djigzo_smtp_helo_name}${djigzo_smtp_helo_name:${myhostname}}
smtpd_authorized_xforward_hosts = 127.0.0.1/32, 192.168.15.52/32
smtpd_banner = $myhostname ESMTP $mail_name
smtpd_discard_ehlo_keywords = silent-discard, dsn, etrn
smtpd_etrn_restrictions = reject
smtpd_recipient_restrictions = permit_sasl_authenticated permit_mynetworks reject_unauth_destination ${djigzo_rbl_clients} ${djigzo_reject_unverified_recipient? reject_unverified_recipient}
unverified_recipient_reject_code = ${djigzo_unverified_recipient_reject_code}
When im removing the relay host [ciphermail] from architecture i'm able to receive mail from external domain.
please suggest the answer.
It looks like you have enabled "Reject unverified recipient". The 450 error message reports that the recipient address cannot be verified. The default Postfix configuration for CipherMail is that Postfix will function as a store and forward server and no local mailboxes. However you have configured mydestination (indirectly by setting djigzo_mydestination) to locally handle mail for svitsolutions.in but you also configured relay_domains (indirectly by setting djigzo_relay_domains) to svitsolutions.in.
With the current config, email sent to svitsolutions.in will be handled by the local transport (which will then store the email locally). However in the default Postfix master.cf config, the local transport is disabled because in the default config, email should not be locally stored. Because the local transport is not available, the recipient verification will fail.
If you want to store email locally you should re-enable the local transport (see main.cf and master.cf) and make sure that a local user is available. If you do not want to store mail locally on the system but only act as a relaying server, set djigzo_mydestination and mydestination to an empty value.
I'm trying to send email via a remote SMTP: port 25, no authentication. I have this script, that gives me the 80040213 error ("The transport failed to connect to the server"). However, when I try with the same parameters from Outlook or Powershell, it works. I googled my ... off but I cannot find a solution.
Any suggestions are welcome. Thanks.
Set objMessage = CreateObject("CDO.Message")
objMessage.Subject = "CDO test"
objMessage.From = "person#firm.com"
objMessage.To = "person#firm.com"
objMessage.TextBody = "This is a test email."
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "<SMTPserver>"
objMessage.Configuration.Fields.Item _
("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
objMessage.Configuration.Fields.Update
objMessage.Send
OK. Finally I found out. McAfee Enterprise blocks communication via port 25 for some applications as a protection against "mass emailing worms".
This is the issue what i am facing
Localhost
Test mail with SMTP settings work
New user creation mail using the above smtp settings work
Server
Test mail with SMTP settings work
New user creation mail using the above smtp settings doesn't work
I echoed the mail smtp settings in both the cases and they are exactly same. The error i am getting is
SMTP -> ERROR: Failed to connect to server: php_network_getaddresses:
getaddrinfo failed: Name or service not known (0)SMTP Connect()
failed.
Any suggestions would be helpful.
I further debug it. The behavior turns out to be wierd
if (isset($_POST['User']))
{
if (UserUtil::validateAndSaveUserData($model, $_POST))
{
$mailer = new UiMailer();
$mailer->setFrom('fromAddress', 'fromName');
$mailer->setTo('toaddress');
$mailer->setSubject('Test subject');
$mailer->setBody('Test Body');
$mailer->Mailer = 'smtp';
$mailer->Username = 'username';
$mailer->Password = 'password';
$mailer->Host = 'host';
$mailer->Port = 25;
$mailer->SMTPAuth = true;
$status = $mailer->send() ? true : false;
if($status == true)
{
print "Sucess";
}
else
{
print $mailer->ErrorInfo . "</br>";
print "Failuere";
}
exit;
}
}
If i comment the call if (UserUtil::validateAndSaveUserData($model, $_POST)), it works fine. In the function i am validating and saving models using Yii framework. I further debug the function. I have the following relation in the system
User has one person
User has one address
So in the above call, if i comment the address part which $model->address->attributes or $model->address->validate or $model->address->save(), it works fine. The save functionality for address works fine. There are no issues related to it.
I'd like to configure a Pylons app, so that I get email on unhandled exceptions.
So far I can't find the way to pass username and password for SMTP connection.
production.ini file:
..
[DEFAULT]
email_to = my_email#gmail.com
smtp_server = smtp.webfaction.com
error_email_from = info#mydomain.com # this'd be a working email on webfaction
..
Please help.
If you want to access them in pylons.config then you want to put them in the [app:main] section of the configuration.
I've used turbomail, and then you can put them in [DEFAULT]. This is what my config looked like.
[DEFAULT]
mail.on = true
email_to = toaddress#domain.com
mail.manager = immediate
mail.transport = smtp
mail.provider = smtp
mail.smtp.server = smtp.domain.com
mail.smtp.username = username#domain.com
mail.smtp.password = passwordhere
error_email_from = paste#localhost
When sending an email from C# with body being large is resulting in failure in sending email
Mailbox unavailable.
The email is working fine with a smaller body. I am using html body to true property..
Thanks,
Zafar
Code:
using (MailMessage _mailMsg = new MailMessage())
{
_mailMsg.From = new MailAddress(ConfigurationManager.AppSettings["mailFrom"].ToString());
_mailMsg.Body = mail.Body;
_mailMsg.Subject = mail.Subject;
_mailMsg.IsBodyHtml = true;
foreach (string strEmailIds in mailTo)
{
if (strEmailIds != null && strEmailIds != string.Empty && strEmailIds != "")
{
if (!_mailMsg.To.Contains(new MailAddress(strEmailIds)))
_mailMsg.To.Add(new MailAddress(strEmailIds));
}
}
//_mailMsg.CC.Add(ConfigurationManager.AppSettings["mailCC"].ToString());
using (SmtpClient _client = new SmtpClient(ConfigurationManager.AppSettings["Host"].ToString()))
{
if (_mailMsg.To.Count > 0)
{
_client.Send(_mailMsg);
}
else
{
_mailMsg.Subject = "No emails associated with the portfolio: " + account + " Original Email:" + mail.Subject;
_mailMsg.To.Add(new MailAddress(ConfigurationManager.AppSettings["mailSuppotTeam"].ToString()));
_client.Send(_mailMsg);
}
Oke, on thing it could be is that the mail server rejects big messages. Let exclude that one... I assume you have a local smtp mail server installed (check for telnet 127.0.0.1 25 that should give a sort of reply) configure the mail server [ConfigurationManager.AppSettings["Host"]] for 127.0.0.1, can you send big mails now?
If ConfigurationManager.AppSettings["Host"] is already the local SMTP server then:
a) stop that smtp service (Simple Mail Transfer Protocol) for a moment (via the command services.msc)
b) send a small email
c) go to c:\inetpub\mailroot\pickup and edit the message via notepad so that it becomes a BIG email
d) start the smtp service again (services.msc)
The issue was with sending email to cross domain email id and was resulting in the Generic exception
"Mailbox unavailable." May be this is one of the reason behind the above exception.