Adding Mandrill SPF Record - mandrill

I need to add the following to an spf record for mandrill validation:
include:spf.mandrillapp.com
Normally this is pretty straight forward but I'm a bit stuck on how to proceed with the follow situation.
Can any one offer any advice on add the above to the below spf record:
v=spf1 ip4: 11.111.11.111 exists:%{i}.mta.spf.xxxx.co.uk exists:%{i}.web.spf.xxxxx.co.uk -all

You had a stray space in there after ip4:, but that may have just been a question artefact. To add that include, do this:
v=spf1 ip4:11.111.11.111 exists:%{i}.mta.spf.xxxx.co.uk exists:%{i}.web.spf.xxxxx.co.uk include:spf.mandrillapp.com -all

Related

Send Mautic Form to different Recipients based on Formfield

I've a Mautic form with Radiobuttons where the User can select which Department he want to connect with.
o General Question (1)
o Sales (2)
o Technical Support (3)
I want to send the Request to the Person in Charge. So for example:
1: info#company.org
2: sales#company.org
3: support#company.org
I've tried different approaches, but non worked.
The most dirty one was to set the values of the radio buttons as E-Mails and send the Form to the Contact. Worked in some way, but then off course saves the Radiobutton Input to the Database as customer E-Mail. So, only smart in the first place. ;)
I've also tried campaigns, but couldn't find a nice way to use Formfields in the Campaign Templates.
I cannot accept that this couldn't be possible in a easy way. This Form gonna replace a Powermail Form in TYPO3 and there it kind of works like a charm.
Any hint is very much appreciated.
Sorry that you found the documentation bad - we are actually in the process of improving and migrating our developer docs, so please take a look at the WIP docs here: https://mautic-developer.readthedocs.io/en/latest/plugins/getting_started.html which are much improved!
(will also post this on the forum thread!)
After weeks and weeks of research and workarounds I got at the Mautic Form, here is my solution to this Challenge.
I really love Mautic and its extensiveness. It’s just a great and powerful tool.
But at this point it totally misses the market. For me it just feels so wrong and like a big error by design, when you have to create fake fields to handle formfields for such a simple task.
Not talking about the problem when the user overwrite his records before the data being send.
As mentioned this is so easy to do in TYPO3 with Powermail and so I was thinking about creating a plugin, but the documentation on this is really bad.
So here is my solution, as I was looking for simple solution for me as well as the customer.
Solution is tested and worked like a charm for me. Here’s what you can do, for everyone also looking something like this:
Create 1 custom field and label it “Owner (form)” - set Type to Text
Create 2 MySQL Trigger as follows (just copy the code 1:1, should work out of the box):
DELIMITER ;;
CREATE TRIGGER set_lead_owner_from_radiobutton_on_insert BEFORE INSERT ON leads FOR EACH ROW
IF (NEW.owner_form != NULL) THEN
IF (SELECT count(id) FROM users WHERE users.id=NEW.owner_form) > 0 THEN
SET NEW.owner_id = NEW.owner_form;
ELSE
SET NEW.owner_id = NULL;
END IF;
END IF;;
DELIMITER ;
DELIMITER ;;
CREATE TRIGGER set_lead_owner_from_radiobutton_on_update BEFORE UPDATE ON leads FOR EACH ROW
IF (NEW.owner_form != NULL) THEN
IF (SELECT count(id) FROM users WHERE users.id=NEW.owner_form) > 0 THEN
SET NEW.owner_id = NEW.owner_form;
ELSE
SET NEW.owner_id = NULL;
END IF;
END IF;;
DELIMITER ;
Create a form with a Radiobutton or Selectbox and set the “Contact Field” to our custom field “Owner (Form)”
Note: Values of the Radiobuttons / Selectboxes need to be set to the User IDs of your Mautic Instance. So you have to create an user for every Select- oder Radiobutton-Option.
Select for example “Send form results” in Actions and set “Send to owner” to yes.
That’s it.
So what does it do. It’s basically all about the MySQL Triggers. Every time a new Lead is created or updated and our custom field “Owner (form)” is not null and has a valid entry (User ID), the trigger copies the value from our field to the original Owner Field of the lead. So we can then use Owner of the Lead (in my case a Department) to send him a E-Mail.
I hope this is helpfull to someone. But even more I hope that Mautic is gonna fix this in the future, as I believe this a very essential task when it come to enterprise Websites.
Cheers,
Lufi
Mautic Forum Discussion: https://forum.mautic.org/t/send-mautic-form-to-different-recipients-based-on-formfield/24363/13

How to make active admin email search to trim preceeding suceeding spaces in rails application

i have active admin in my rails application. while searching the users based on their email,in the right side of the page(filters), if i enter any email that contains preceding and succeeding spaces,then the results are empty
i want to customise the active admin filter search, in such a way that it trims these preceding and succeeding spaces and provide the results while searching. how can i implement this. as i am new to the active admin i do not know how to customise it.
def override_search
end
It might be overkill, but one way would be to use a ransacker. Another way would be to define a custom formtastic input. However, the easiest way might be to attach some JavaScript to the input onBlur to trim any content before submission.

Exchange 2010 strange behaviour on search UID SEARCH CHARSET US-ASCII FROM

I'm really spent a lot of time searching about, but no luck.
My issue is not directly related to Mailkit working or not, it is doing right but perhaps someone here have a clue.
I have to look for mails unseen mails from specific mail address on a Exchange 2010 using IMAP. All work fine (until now) for any server except this one.
When "from" mail address in format like John Doe <johndoe#pluto.com> a search for johndoe#pluto.com does not return any UIDs;
John Doe return UID collection;
On the other hand if "from" mail is in plain format all works fine.
Does anybody have any idea or know if is it an issue on Exch2010?
As a work around I'm thinking to make a simple search unseen to get UIDs then Fetch and look at Envelope
By the way here I have on log when message from = John Doe <johndoe#pluto.com>;
C: A00000006 UID SEARCH CHARSET US-ASCII FROM johndoe#pluto.com
S: * SEARCH
S: A00000006 OK SEARCH completed.
Almost 1 year later, seems I found why I can´t get any result when searching From when mail address have Display Name.
Here Dmitry explain Exchange behaviour
https://blogs.technet.microsoft.com/dkhrebin/2013/10/04/how-exchange-imap-search-in-message-header/
A short quote say:
If you use SEARCH FROM (for CC, BCC, TO idea the same) Exchange will search in message's Property: PR_SENT_REPRESENTING_NAME, PR_SENT_REPRESENTING_NAME_A,
ptagSentRepresentingName
The PR_SENT_REPRESENTING_NAME property contains the display name for the messaging user represented by the sender.
So in addition to:SearchQuery.FromContains ("johndoe#pluto.com").Or (SearchQuery.FromContains ("John Doe"));
I can use SearchQuery.HeaderContains ("from", "johndoe#pluto.com");
Since Display Name can be anything and can be changed anytime, and mail address is always same. I can deal with both commands command lines above.
But I can't determine which has the best performance.
I've noticed that each IMAP server seems to behave differently with respect to searching for email addresses and/or Message-Id tokens.
What you may need to do is either do an OR search query:
SearchQuery.FromContains ("johndoe#pluto.com").Or (SearchQuery.FromContains ("John Doe"));
Perhaps that will work around the problem so it works with all IMAP servers?

ResearchKit: Validate email

I'm attempting to create a form step where one of the form step items is an email input. For this I want to validate the email against certain domains i.e.
#gmail.com, #icloud.com, #me.com
I can see we have an email answer format in the form of this:
ORKEmailAnswerFormat()
However I can't see anywhere in this type that allows me to apply a validation regex. Looking into this I see we have the following
ORKAnswerFormat.textAnswerFormatWithValidationRegex(validationRegex, invalidMessage)
I suppose this is my best option? If so, would anyone know of a regex (my regex isn't the greatest!) in swift that would handle the 3 domains stated above?
I have something like this...(not the greatest i know!)
[A-Z0-9a-z._%+-]+#gmail.com
[A-Z0-9a-z._%+-]+#(?:icloud|me|gmail)\.com
(or, if you don't care about capturing:)
[A-Z0-9a-z._%+-]+#(icloud|me|gmail)\.com
Now I made two modifications. I escaped the . and I made it so that the other two domains are options.
I suggest that you convert the whole thing to lower case. I don't know Swift, but you may be able to use one of its functions or the i modifier:
(?i)[0-9a-z._%+-]+#(icloud|me|gmail)\.com

Replacing & Restricting Emails and URLs In Text Area

I have a discussion board, and users can post comments on the board. But to cut down on spam, I am looking for a way to replace any URLs or Email addresses the users put in the text area with something like 'forbidden'. or even just removing them entirely.
I don't really have a clue where to start, so even something as a direction would help greatly. I was thinking of using Regex somehow, or I thought I recalled there's something in Rails already that .restricted or .constrained different things in a text area.
Thanks..
You should use ActiveRecord callbacks to check the comments before they're saved in the DB. Look here for examples (like before_validation or before_save to replace), and use Regex to replace the forbidden content.
Do not try to remove fordidden words in the JavaScript of your page, that's not a good solution: it can be easily bypassed by the user.

Resources