postfix – Blocking encrypted emails attachments with Amavis

I’m having a problem with amavis on my Centos 7 machine (amavisd-new 2.12.0, postfix 2.10.1, ISPConfig Version: 3.1dev).

I’m trying to configure amavis so that it discards emails with encrypted .zip or .rar files attached. (sender gets a notification of undelivered email because of non-allowed content and a notification is also sent to as notification of what happened. The alias of virusalert is already configured, I receive those emails in my mailbox).

At the moment, amavis detects the encrypted package attached to an email, but it forwards it to the recipient anyway and it sends to virusalert mailbox a notification of what has been done.

Here’s the message I receive from
(I’ve sent an email from our internal mail server, that uses the one with amavis configured as relay, to my personal mailbox)

No viruses were found.

Content type: UncheckedEncrypted

Internal reference code for the message is 21621-04/VDsYr4oLBKP5

First upstream SMTP client IP address: (Sender IP):7555

Sender rDNS

Received trace: ESMTPA://(Sender IP):7555 <

  Microsoft_SMTP_Server://InternalServerIP < mapi://

Return-Path: <>

From: "My user"


Message-ID: <>

Subject: Test encrypted archive

Not quarantined.

The message WILL BE relayed to:


Postfix’s log shows the following:

postfix/smtpd(21623): connect from myhost(myIP)
postfix/smtpd(21623): NOQUEUE: filter: RCPT from myhost(myIP): <>: Sender address triggers FILTER amavis:(; from=<> to=<> proto=ESMTP helo=<SMTP.local>
postfix/smtpd(21623): 53BFA7FB: myhost(myIP), sasl_method=LOGIN, sasl_username=myusername
postfix/cleanup(21634): 53BFA7FB: message-id=<>
postfix/qmgr(20232): 53BFA7FB: from=<>, size=28650, nrcpt=1 (queue active)
postfix/smtpd(21623): disconnect from myhost(myIP)
postfix/smtpd(21639): connect from localhost(
postfix/smtpd(21639): C04406DC: client=localhost(
postfix/cleanup(21647): C04406DC: message-id=<>
postfix/qmgr(20232): C04406DC: from=<>, size=3126, nrcpt=1 (queue active)
postfix/smtpd(21639): disconnect from localhost(
postfix/cleanup(21634): CA805A93: message-id=<>
postfix/qmgr(20232): CA805A93: from=<>, size=3261, nrcpt=1 (queue active)
postfix/local(21678): C04406DC: to=<>, relay=local, delay=0.05, delays=0.02/0.03/0/0.01, dsn=2.0.0, status=sent (forwarded as CA805A93)
postfix/qmgr(20232): C04406DC: removed
postfix/smtpd(21646): connect from localhost(
postfix/smtpd(21646): D5426A67: client=localhost(
postfix/cleanup(21647): D5426A67: message-id=<>
postfix/qmgr(20232): D5426A67: from=<>, size=29603, nrcpt=1 (queue active)
postfix/smtpd(21646): disconnect from localhost(
amavis(21621): (21621-04) ***Passed UNCHECKED-ENCRYPTED*** {RelayedOutbound}, ORIGINATING LOCAL (myIP):7555 (myIP) <> -> <>, Queue-ID: 53BFA7FB, Message-ID: <>, mail_id: VDsYr4oLBKP5, Hits: -0.998, size: 28650, queued_as: D5426A67,, 2477 ms
postfix/smtp(21635): 53BFA7FB: to=<>, relay=, delay=2.6, delays=0.08/0/0/2.5, dsn=2.0.0, status=sent (250 2.0.0 from MTA(smtp:( 250 2.0.0 Ok: queued as D5426A67)
postfix/qmgr(20232): 53BFA7FB: removed
dovecot: lda( sieve: msgid=<>: stored mail into mailbox 'INBOX'
postfix/pipe(21679): CA805A93: to=<>, orig_to=<>, relay=dovecot, delay=0.08, delays=0.01/0.02/0/0.06, dsn=2.0.0, status=sent (delivered via dovecot service)
postfix/qmgr(20232): CA805A93: removed

Why amavis detects the emails correctly but it just marks them as Passed UNCHECKED-ENCRYPTED and forwards them to the recipient anyway?

I’ve researched online for the correct configuration to stop forwarding messages that attach encrypted archives (or gets marked as unchecked-encrypted by amavis), but so far nothing fully works.

Can someone help me?

Thanks a lot

media library – Does using the WordPress Import tool still include attachment data if “Download and import file attachments” is not selected?

I’m in a unique situation where I have to import WordPress content into a production server, but I don’t have SSH access to the server files or database. I can’t install plugins on the production server, so I am limited to the built-in WordPress Importer tool.

I don’t have any issues bringing over Posts and Pages, but it’s extremely hit or miss when bringing over the Media Library, of which I have something like ~2000 items.

What I do have, however, is access to the S3 bucket where the production server hosts the Media Library. The production server also automatically rewrites URLs for the media library to point to the S3 bucket.

My question is: If I migrate my Media Library files to my S3 bucket beforehand, then use the WP Exporter tool to export “All content” from my source site and import it into my production site and leaving “Download and import file attachments” unchecked, will my Attachment data (not the files themselves) still be imported into the database?

magento2.4.1 – Multiple email attachments in Magento 2.4.1

How to send Multiple email attachments in mail Magento 2.4.1?

I tried etcdi.xml

<preference for="MagentoFrameworkMailTemplateTransportBuilder" type="VendorModuleMagentoMailTemplateTransportBuilder" />

and in mail function:-

$transport = $this->transportBuilder->setTemplateIdentifier($template)
            ->setTemplateVars(('data' => $postObject))
            ->addAttachment($file, $name)
            ->addAttachment($file2, $name2)

Good Chat attachments from Shared Drive on IOS

I am not able to see the Shared Drive when I am trying to attach a file in chat. I only have access to pick for My Drive. Is there a way to access the Shared Drive on Chat being used on an IPHONE?

Why is my custom webform handler, when called via cron, doesn’t load and email attachments?

I created a custom webform handler that on postSave adds webform id to the queue:

public function postSave(WebformSubmissionInterface $webform_submission, $update = TRUE) {

$item = array(
  'submission' => $webform_submission,

// Add the item to the queue.
$queue_factory = Drupal::service('queue');
$queue = $queue_factory->get('custom_send_emails');

This is the QueueWorker:

 * Send Emails
 * @QueueWorker(
 *   id = "custom_send_emails",
 *   title = @Translation("send emails"),
 *   cron = {"time" = 120}
 * )
class CustomEmailQueue extends CustomEmailQueueBase {}

and this is the QueueWorkerBase that on processItem send the email that is build by a custom mail handler:

public function processItem($item) {

  function custom_form_send_emails(WebformSubmissionInterface $submission) {
    $webform = $submission->getWebform();
    $handler = $webform->getHandler('local_email');

I have tried everything! When Cron runs, it takes the first item of the queue create the message correctly and send the email with the attachments. Then it continues to the rest of the items and for all of them it doesn’t build correct the message. The to_email is empty. The $attachments array of the $message is empty.

Why does it do that? Why the first item of the queue is send correctly and the rest fail?

With Debug I found that in the first queue item process, it calls from EmailWebformHandler.php the getMessageAttachments() and the getElementsInitializedAndFlattened fetches more elements(the attachments and everything) than in next calls? WHY?

Eventually I found that this segment of code in my local_email handler causes the problem and I don’t understand why:

 //get communication language
    $values = $webform_submission->getData();
    $language = $this->languageManager->getLanguage($values('communication_language'));
    $mail_config = Drupal::config('webform.webform.sme_fund');
    $subject = $mail_config->get('handlers.local_email.settings.subject');
    $subject = $this->replaceTokens($subject, $webform_submission);
    $body = $mail_config->get('handlers.local_email.settings.body');
    $current_langcode = $values('communication_language');
    $message('subject') = $subject;
    $message('body') = $body; – Sving mail ATTACHMENTS to external drive

All I want to do is save certain incoming mail attachments to an external drive, not a whole folder or even a whole email. I want to set up a RULE in Mail that will automatically select certain regular attachments I receive and file them in a designated folder on a connected external drive, deleting them from Mail.

Clearly, Apple Mail’s Rules exclude any such capability and only allow filing in another Mail folder. Can anybody suggest a simple way of accomplishing this?

json – Clickable href with the attachments

I have a list with the following columns

Job Description (Single Line of Text)

and also i got a Column named “internLink” which contains the exakt name of the document which is attached.

Now i wanted to ask, if it is possible to just get the document name of the attachment with json an insert it into a json href?

Thanks in advance


sharepoint online – post message with attachments to yammer

Hi I am using console application to upload a document to yammer using Yammer REST API.

For access token I am using developer token generated from a registered app in yammer (

Can you please guide me on how to achieve this functionality or post any useful links

I have tried the following links and it is not working (not getting any response)


2013 – Open “Add Attachments” popup in new tab – Is it possible?

There is no OOB setting in SharePoint for this requirement.

If you want to change the open behavior for the “Attach File” button in the list, you will need to use custom solution, which will be rather complicated since the item needs to be selected first.

Automated way to move Gmail image / video attachments to Google Photos

I’m running out of storage in my Google account. In order to save space, I’m trying to move many images and videos from Gmail into Google Photos with “high quality” (where Google Photos offers unlimited storage).

I know this can be done manually with some help from Google One storage management, but I’m looking for a way to automate a batch process of finding all image / video attachments in emails, uploading them to Google Photos, and deleting them from Gmail, while preserving the email thread.

Ideal outcome would be:

  1. Image and video attachments deleted from Gmail
  2. All text in emails preserved
  3. Image and video attachments uploaded to Google Photos
  4. links to the location of the attachments included in the email thread (in a way that doesn’t send an email to anyone else in the conversation or move the message back to my inbox)

If not all of this is possible, automating some of the items would be helpful. If there’s a script that does some of the work that I could modify, that could be a solution.

Things I’ve looked into already:

  1. gmail support: How can I move photo attachments in my email to
    google photos or google drive?
  2. Stack exchange question: Easy
    way to move photos from Gmail attachment to Google Photos
  3. Chrome extension: Save Image to Google Photo