phpBB3 - dont send activation email for certain mail services - php

I using phpBB 3.0.12 and encountered with issue:
some mail services like mail ru recognising activation emails from my from like spam messages and return them with 550 error
Oct 27 10:37:02 26sp postfix/smtp[31754]: 33347587974:
to=, orig_to=,
relay=mxs.mail.ru[217.69.139.150]:25, delay=2.5,
delays=0.01/0/0.08/2.4, dsn=5.0.0, status=bounced (host
mxs.mail.ru[217.69.139.150] said: 550 spam message rejected.
Please visit
http://help.mail.ru/notspam-support/id?c=Jdo_XLgUDbBjA8QmVnqeZQShDEMZPvTFdwpE_P3-ufG-37333wCzdKLWRJxdUdKdCgAAAPSVAAAAriEj
or report details to abuse#corp.mail.ru. Error code:
5C3FDA25B00D14B826C40363659E7A56430CA104C5F43E19FC440A77F1B9FEFDF7BDDFBE74B300DF9C44D6A29DD2515D.
ID: 0000000A000095F42321AE00. (in reply to end of DATA command))
550 error means that users marked as spam mailings from forum and mail.ru categorized any mailings as spam. I already send request to support remove forum from spam lists but any email notifications sended by forum doesnt eaven get to emails in mail.ru.
Question: i want write something like don't send email activation if user entered ****#mail.ru in registration. But im not familiar with phpBB.
can someone help me where find function for sending activation emails.
I'll be very appreciate for any help.

IMPORTANT! Before making any changes, make sure you have a back up just in case things go wrong.
Using FTP download from your site this file - language/xx/ucp.php (where xx is the language code, eg. for English it is en)
Open it in a proper text editor that is capable of saving files as UTF8 without BOM and NOT a word processor or Notepad as these can cause problems.
I'll give you the example using the English version as thats what I use on my site...
Look for:
'UCP_ADMIN_ACTIVATE' => 'Please note that you will need to enter a valid e-mail address before your account is activated. The administrator will review your account and if approved you will receive an e-mail at the address you specified.',
and:
'UCP_EMAIL_ACTIVATE' => 'Please note that you will need to enter a valid e-mail address before your account is activated. You will receive an e-mail at the address you provide that contains an account activation link.',
You can change the message in these two lines to suit your needs. Once done, save and upload back to your server using FTP.

Related

how to make my website logo show in email?

i developed a web application with personalized email through my cpanel (admin#tailorsmind.com), connected it with my application through php (swiftmailer) in the source code, emails are going through for registration, login and forgot password but the problem I am simply having is my website logo won't simply just show up in each email that is sent.
I logged in the email in outlook, tried checking for image settings but couldn't get one.
also created a gmail account with the email and uploaded a logo but still not getting the result i am looking for . Please help !!!
it just keeps showing that question mark you see there and i don't want that.

Emailing Processing Bounces

I have a database that contains 20K of what the email I was sending newletter The problem I found was that each of the email I sent back type
Delivery Status Notification (Failure)
I am willing to transfer this email which is inactive knowing that I filter all email from the standpoint of the field formatting and existence.
as I have to see how little research has addressed this problem I find the notion that bounces are already implemented on the software.
If any one has any That a idea how I can apply that bounces in the php will be welcome
cordially
Well, it's pretty hard to understand what are you talking about, but...
As you mentioned, when e-mail can't be delivered (for many reasons) you will get Delivery Status Notification which will goes to inbox of e-mail that you used to send the message.
For example, if you send newsletter from newsletter#test.com to customer#test.com and the message can't be delivered then you get notification at newsletter#test.com. So just open your newsletter#test.com inbox with php, read the messages, parse them, and save the errors (if occurs) in database, matching by e-mail.
This link could be useful:
http://php.net/manual/en/function.imap-open.php
If you have your mailbox at your own server then the thing is much simpler, because all you need to do is to make ln, and then just open the file to parse.
ln -s /var/mail/my-inbox /var/www/my-script/inbox

How to validate if the E-Mail Address is existing in YMail,Gmail,etc.?

how do i validate Existing E-Mail Address.
in a Registration system, when a user enter a Email address it checks if the Email address is existing or not in Ymail/Gmail.
i already have a running domain(for Practice).
You have my regards.
Most registration systems validate an email address by sending an email to it with a uniquely encoded URL in it and requiring the user to go get that email and click on the link. When your server sees that the link has been clicked on the email address is know to be accessed by you.
Here's a basic flowchart for how it works:
User goes to your website
User commences registration and fills in their email address
Server checks to see if email address is in a legal and proper form and is not already registered
If the rest of the user's registration looks good and then email address looks legal, the server creates an account in your system and puts in the "unverified" state.
Then, a code is generated that corresponds to that specific user. That code is put onto an URL and that URL is put into an email which is sent to the email address the user entered.
The user receives the email with instructions to click on the enclosed link.
User retrieves email and clicks on the link.
Your server receives web request from that link. It parses out the code from the URL and checks to see if that code matches an account that is in the "unverified" state. If so, and the account has not expired from too much time elapsing since the email was sent, then the account is put into the "verified" state and is ready for use.
The basic idea of this system is that if you can retrieve an email sent to that email address then the email address must be a valid and working email address and you, the user, must be able to access that email address (it's not just some random email address you made up).
Back in the day, you could easily validate email addresses. Then the spammers came along. Now the only way you can confirm the existence of an email address is by trying to send something to it and checking for bounces. And even then, the lack of a bounce doesn't mean it exists - it could simply have been silently deleted, ignored, spam filtered into oblivion, etc...
Basically, what you want is not possible - any such system would simply help spammers hammer your box with more russian brides popping penis pills while wearing fake rolexes.
SMTP provides VRFY and EXPN verbs to check if an account or mailing list exists. However, most server admins disable these verbs from their mail configuration to prevent hackers from exploiting user lists. Gmail and Yahoo are said to have VRFY disabled.
Another option you can try for these servers is emailing the user with a link to confirm their email address. Granted, it is not as sexy as realtime email verification, but it is more secure for all parties.
It is practically not possible to validate email address with growing number of spams.
These days people send a mail to the email address entered by user to complete the registration or activate the account. You can probably do that and is a much safer way to do. You can find a number of resources online to implement this functionality.

Detect expired e-mail addresses? [duplicate]

This question already has answers here:
Closed 11 years ago.
Possible Duplicate:
How to check if an email address exists without sending an email?
Possible duplicate:
How to check if an email exists without sending an email?
I have a very big database with users (over 50000) and there are lots of automated e-mails the site sends out.
The problem is, quite a few of the addresses in the database (that users registered with years ago) have expired or have been deleted or no longer exist for whatever reason.
This creates an issue, because each user should have a valid e-mail.
I've been trying to find out if there's a way to detect whether an e-mail address is active, so we could update the database and prompt those users to enter a new e-mail? Something like a ping for e-mail addresses?
There's some code here that I've tried to figure out but to no avail:
http://www.webdigi.co.uk/blog/2009/how-to-check-if-an-email-address-exists-without-sending-an-email/smtpvalidateclassphp/
Does anyone have a solution?
Please note that I need a PHP solution, not command line since I have 50k e-mails to check.
Two things, first you should stop the influx of potentially in-valid email addresses by implementing a 'closed-loop' email verification system. Basically, when a user signs up for your site, you send an email with a link confirming their email address, and when they confirm, their account gets full access to your site.
Secondly, there is no real way to determine if an an email address is invalid strictly using PHP. I had to tackle this problem a few months ago, and we ended up using the mail-server to tell us if an email address has been bounced back or not. When your mail server sends an email, and the email cannot be delivered, the recipient mail-server will respond with a bounce notification to your mail-server which includes information as to why the email was bounced. Information such as a Delivery Status Notification (DSN) code which identifies why the email address couldn't be delivered.
Some example codes:
511: Bad Mailbox
512: Bad System
516: Mailbox Moved
These codes are made up of a prefix (4 or 5) to indicate a transient (temporary) or permanent failure. The following two digit code indicates an error range; two digit codes between 10 and 19 indicate an error relating to the email address, whereas codes between 20 and 29 indicate an error relating to the email mailbox.
From these codes you can determine, based on business requirements, a 'hard bounce' or a 'soft bounce'. A hard bounce would be something like 511 (bad mailbox), where it's certain that this email address is not currently valid. A soft bounce would be something like 445 (network congested), which indicates that it was a temporary issue as to why the email could not be delivered.
So in your instance, you could send out an email blast, and then track the bounces on your mail server. By looking at each bounce and the respective DSN code, you can flag whether an account's email is valid or not (we used PHP to gain access to the mail server and parse the bounce notifications for the DSN codes)
Here is more information on DSN codes.
-- Edit --
As Dagon wisely mentioned, you can pipe bounced emails into a PHP script upon their receipt. To do this you will need to read up on your mailserver config, but ours looks similar to the following:
bouncehandler unix - n n - - pipe
user=nobody argv=/usr/bin/php /path/to/BounceHandler.php
<% end %>
The only way to check if an e-mail address is expired or not is to send an e-mail message to it and see if you get a response. But note that doing so may be considered spamming, since it is an unsolicited message.
You can check if an e-mail address if properly formed, and if the mail server it specifies actually exists, but thats about it. There is no way that I know of to check if the account exists (and if a human is reading the mail sent there) without sending a mail with a link and requesting that the user click the link.

How to know if a email address is invalid?

My email address on www.email.it has been disabled because I haven't used it for a long time.
Now, when I go on a FB, I get this message:
"Our systems have detected that xxxxxxx#email.it is no longer a valid email. "
So my question is:
How these systems can detect if an email is valid ?
You cannot detect if an email is fake. All you can do is to detect whether a string respects the RFC 5322 of a valid email address format. You can't possibly know whether such an account has been declared at the target SMTP server unless you own this server. You can probably try to send an email to this address and see what does the remote SMTP server responds.
You can't reliably determine if an email is valid or not. SMTP servers are suppose to implement the VRFY command but many have this disabled to prevent spammers from being able to detect valid email address.
Additionally, even if an email address respects the RFC 5322 valid email address format does not mean that it is a valid email address on the destination server; many servers do not correctly implement this standard!
The best that you can do is send an email to the address with a click back link in the email. If the email address is valid and the user reads the email and the user clicks the link then it might be the case that the email address is valid (it could have been intercepted too thus giving you a false positive).
If the email bounces back, it might indicate that the email address is not valid (but it could also be the case that the destination server is down, or the mailbox is full, or who knows what else).
As you can see, SMTP is remarkably unreliable given how well it works in practice.
Most likely Facebook tried to send mail to that address. They know that the address isn't valid because the mail bounced.
Perhaps they tried to send an email (such as an update EULA) to said host and it responded in an unkind fashion -- hence "not valid"
SMTP is sort of stupid on how it handles -- or doesn't handle -- "can't deliver" messages uniformly, but the various detections may work "well enough" (VRFY, inspecting automatic reply messages, etc.)
I am pretty sure that FB had sent you any kind of email , and since that your mail is deleted or deactivated ..... there for your email will bounce back to them with the error message like :
No such user
mailbox unavailable
etc ..
so they were able to know that and deactivate your account
if you curious to know that error message just send an email and wait for it to bounce back to you
simple but handy :)
What some companies do (and possibly FB as well, though I don't know for certain) is periodically send an email to the account, simply to see if it is "live" - they will request the receiver to click a link on it to prove the email address is still in use.
After several such emails that have received no response (or were bounced), they will consider the email address "dead".

Categories