unix
Hashing, if you didn’t know, is a term generally meant to refer to converting a bit of text, a key, or a file into a specific type of value. In the context of email address hashing, we’re talking about “one way hashing,” meaning that you convert an email address into a hashed value, but once that’s done, you can’t convert it back to an email address.Why do you ever need to hash email addresses? Because, if you’re ever working with a marketing partner, or list rental, or perhaps even a newsletter sponsorship, you need to make sure that the partner or list owner, when sending that advertisement (or newsletter containing the advertisement), doesn’t send it to people who have already unsubscribed from your emails.If I sell widgets, and I’m sponsoring Bob’s newsletter, and he’s going to send out an email advertising widgets for me, to comply with the law (and best
Hey, *nix users! Did you know that you can send email using cURL? If you weren’t aware, cURL “is a computer software project providing a library (libcurl) and command-line tool (curl) for transferring data using various network protocols. The name stands for ‘Client URL’ (wikipedia).” It’s a very handy tool for those of us working in the email security, anti-spam or software-as-a-service space, allowing us to interact with web servers and services to download files and data. I use it quite a bit. But I had no idea that it can speak SMTP! It doesn’t look too difficult, either.Here’s how I tested it myself, composing the command thusly (ignore those goofy quotes at the start and end): curl –ssl-reqd –url ‘smtp://gmail-smtp-in.l.google.com:25’ –mail-from blarfengar@xnnd.com –mail-rcpt nugget@wombatmail.com –upload-file –
Here’s a neat unix/linux email trick: How to get notified via email for SSH logins, courtesy of Tech Republic’s Jack Wallen. And it uses your Gmail account to send the mail, like I offered up back in 2020 (great minds think alike). You don’t NEED to implement that step if your server has a good email sending reputation and history already, but if you don’t — if the server hardly sends any mail at all, you’re not sure if DKIM or DMARC is set up properly, etc., then sending via Gmail is a great way to do it, letting you bypass IP warming, reputation and authentication configuration issues. Anyway, beyond that, the core of the notification setup itself is pretty simple. Click on through to see how it is configured.
Need to export a file from Linux via email? Got uuencode? Do you even remember uuencode? It’s how we used to encode files for file sharing, back before you were born. Because I’m old.Here’s a handy one-liner that will wrap your file up as a UUEncoded attachment and mail it to the address you specify. The email should come through with a properly formatted attachment that you can then download.Just do this (all on one line):% cat file.zip | uuencode file.zip | mail recipient@example.comOr you can get a bit fancier and add a subject line and a proper from address (if your system doesn’t add one already):% cat file.zip | uuencode file.zip | mail -s “Export of file.zip” -a “From: Me ” recipient@example.comOr you can do it as part of a shell script, with bits that look something like this:FROM=”Just Me “TO=”recipient@example.com”FILE=”file.zip”cat $FILE | uuencode $FILE mail -s “Export of $FILE attached”…