Our teacher, the Rema, wrote: This fast is not an obligation. Therefore, one may be lenient regarding it in a time of need, such as pregnant women, or nursing women, or for a person with a non-life-threatening illness. And even those who only have eye pains, if they are suffering greatly—they should not fast, and they shall pay it back afterward. But other healthy people—should not separate themselves from the community. Thus far his words. Even one who is traveling on the road, and the fast is difficult for him (Magen Avraham), provided that the fast will not harm him. And one must be precise with his words, for he counted pregnant women, nursing women, and a person with a non-life-threatening illness. But do these not even in the four fasts not need to fast, as I wrote in siman 550!? However, regarding pregnant and nursing women, one can answer: there he wrote specifically when they are suffering greatly, see there, and here even in an ordinary case—they do not need to fast. But what he wrote regarding a person with a non-life-threatening illness—is very wonderous, for this is permitted even on Tisha B'Av, as I wrote in siman 554, for in a place of illness the Rabbis did not decree, see there. And this is without danger, for in a case of danger even on Yom Kippur we are obligated to feed him, as I wrote there. And these matters are only possible according to the one who holds that this fast is from Divrei Kabbalah, and is very stringent, as I wrote, and not according to what we hold that it is only a mere custom. And it requires further study. (And the Eliyah Rabbah wrote: that it is implied in the Gemara that they are obligated to fast—I do not know of any such implication. And what he wrote from the Beit Yosef in the name of the Ra'avad at the beginning of siman 687—the Ra'avad follows his own reasoning, as I wrote.)
וכתב רבינו הרמ"א: תענית זה אינה חובה. לכן יש להקל בו לעת הצורך, כגון מעוברות, או מניקות, או לחולה שאין בו סכנה. ואפילו רק כואבי עינים, שאם מצטערים הרבה – לא יתענו, ויפרעו אחר כך. אבל שאר בריאים – לא יפרשו מן הציבור. עד כאן לשונו. אפילו ההולך בדרך, וקשה עליו התענית (מגן אברהם), אם רק לא יזיק לו התענית. ויש לדקדק בדבריו, דחשיב מעוברות, ומניקות, וחולה שאין בו סכנה. והא אלו אף בארבע צומות אינם צריכים להתענות, כמו שכתבתי בסימן תקנ!? אך בעוברות ומניקות יש לתרץ: דשם כתב דוקא כשמצטערות הרבה, עיין שם, ובכאן אפילו בסתמא – אינן צריכות להתענות. אבל מה שכתב חולה שאין בו סכנה – הרבה תימה, דזהו אפילו בתשעה באב מותר, כמו שכתבתי בסימן תקנד, דבמקום חולי לא גזרו רבנן, עיין שם. וזהו בלא סכנה, דבסכנה גם ביום הכיפורים מחוייבים להאכילו, כמו שכתבתי שם. ודברים אלו לא יתכנו רק למאן דסבירא ליה דתענית זה הוא מדברי קבלה, וחמיר טובא, כמו שכתבתי, ולא לפי מה דקיימא לן דאינו אלא מנהגא בעלמא. וצריך עיון. (והאליה רבה כתב: דמשמע בהגמרא שחייבות להתענות – לא ידעתי שום משמעות. ומה שכתב מבית יוסף בשם הראב"ד ריש סימן תרפ"ז – הראב"ד לשיטתו, כמו שכתבתי.)